Skip to content

Commit

Permalink
Fix #782: add unit test for http-proxy option
Browse files Browse the repository at this point in the history
Signed-off-by: ChuJiani <75904462+ChuJiani@users.noreply.github.com>
  • Loading branch information
ChuJiani committed Mar 9, 2024
1 parent 3c16917 commit 5c3ccba
Showing 1 changed file with 21 additions and 0 deletions.
21 changes: 21 additions & 0 deletions pytests/test_container_to_args.py
Original file line number Diff line number Diff line change
Expand Up @@ -130,3 +130,24 @@ async def test_sysctl_wrong_type(self):
with self.assertRaises(TypeError):
cnt["sysctls"] = wrong_type
await container_to_args(c, cnt)

async def test_http_proxy(self):
c = create_compose_mock()

cnt = get_minimal_container()
cnt["http_proxy"] = False

args = await container_to_args(c, cnt)
self.assertEqual(
args,
[
"--name=project_name_service_name1",
"-d",
"--http-proxy=false",
"--net",
"",
"--network-alias",
"service_name",
"busybox",
],
)

0 comments on commit 5c3ccba

Please sign in to comment.