mirror of
https://github.com/containers/podman-compose.git
synced 2025-06-19 19:27:47 +02:00
Format
Signed-off-by: Elsa <zeyugao@outlook.com>
This commit is contained in:
parent
c381e118ee
commit
24899edbed
@ -625,7 +625,8 @@ class TestContainerToArgs(unittest.IsolatedAsyncioTestCase):
|
|||||||
"--name=project_name_service_name1",
|
"--name=project_name_service_name1",
|
||||||
"-d",
|
"-d",
|
||||||
"--network=bridge:alias=service_name",
|
"--network=bridge:alias=service_name",
|
||||||
"--pids-limit", "100",
|
"--pids-limit",
|
||||||
|
"100",
|
||||||
"busybox",
|
"busybox",
|
||||||
],
|
],
|
||||||
)
|
)
|
||||||
@ -633,13 +634,7 @@ class TestContainerToArgs(unittest.IsolatedAsyncioTestCase):
|
|||||||
async def test_pids_limit_deploy_section(self):
|
async def test_pids_limit_deploy_section(self):
|
||||||
c = create_compose_mock()
|
c = create_compose_mock()
|
||||||
cnt = get_minimal_container()
|
cnt = get_minimal_container()
|
||||||
cnt["deploy"] = {
|
cnt["deploy"] = {"resources": {"limits": {"pids": 100}}}
|
||||||
"resources": {
|
|
||||||
"limits": {
|
|
||||||
"pids": 100
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
args = await container_to_args(c, cnt)
|
args = await container_to_args(c, cnt)
|
||||||
self.assertEqual(
|
self.assertEqual(
|
||||||
@ -648,7 +643,8 @@ class TestContainerToArgs(unittest.IsolatedAsyncioTestCase):
|
|||||||
"--name=project_name_service_name1",
|
"--name=project_name_service_name1",
|
||||||
"-d",
|
"-d",
|
||||||
"--network=bridge:alias=service_name",
|
"--network=bridge:alias=service_name",
|
||||||
"--pids-limit", "100",
|
"--pids-limit",
|
||||||
|
"100",
|
||||||
"busybox",
|
"busybox",
|
||||||
],
|
],
|
||||||
)
|
)
|
||||||
@ -657,13 +653,7 @@ class TestContainerToArgs(unittest.IsolatedAsyncioTestCase):
|
|||||||
c = create_compose_mock()
|
c = create_compose_mock()
|
||||||
cnt = get_minimal_container()
|
cnt = get_minimal_container()
|
||||||
cnt["pids_limit"] = 100
|
cnt["pids_limit"] = 100
|
||||||
cnt["deploy"] = {
|
cnt["deploy"] = {"resources": {"limits": {"pids": 100}}}
|
||||||
"resources": {
|
|
||||||
"limits": {
|
|
||||||
"pids": 100
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
args = await container_to_args(c, cnt)
|
args = await container_to_args(c, cnt)
|
||||||
self.assertEqual(
|
self.assertEqual(
|
||||||
@ -672,7 +662,8 @@ class TestContainerToArgs(unittest.IsolatedAsyncioTestCase):
|
|||||||
"--name=project_name_service_name1",
|
"--name=project_name_service_name1",
|
||||||
"-d",
|
"-d",
|
||||||
"--network=bridge:alias=service_name",
|
"--network=bridge:alias=service_name",
|
||||||
"--pids-limit", "100",
|
"--pids-limit",
|
||||||
|
"100",
|
||||||
"busybox",
|
"busybox",
|
||||||
],
|
],
|
||||||
)
|
)
|
||||||
@ -681,13 +672,7 @@ class TestContainerToArgs(unittest.IsolatedAsyncioTestCase):
|
|||||||
c = create_compose_mock()
|
c = create_compose_mock()
|
||||||
cnt = get_minimal_container()
|
cnt = get_minimal_container()
|
||||||
cnt["pids_limit"] = 100
|
cnt["pids_limit"] = 100
|
||||||
cnt["deploy"] = {
|
cnt["deploy"] = {"resources": {"limits": {"pids": 200}}}
|
||||||
"resources": {
|
|
||||||
"limits": {
|
|
||||||
"pids": 200
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
with self.assertRaises(ValueError):
|
with self.assertRaises(ValueError):
|
||||||
await container_to_args(c, cnt)
|
await container_to_args(c, cnt)
|
||||||
|
Loading…
x
Reference in New Issue
Block a user