chore: add cgroup and container_name test case
This commit is contained in:
parent
5892237eae
commit
603f552551
1 changed files with 30 additions and 0 deletions
|
@ -241,6 +241,31 @@ from compose_viz.parser import Parser
|
|||
],
|
||||
),
|
||||
),
|
||||
(
|
||||
"cgroup_parent/docker-compose",
|
||||
Compose(
|
||||
services=[
|
||||
Service(
|
||||
name="frontend",
|
||||
image="awesome/frontend",
|
||||
cgroup_parent="system",
|
||||
),
|
||||
],
|
||||
),
|
||||
),
|
||||
(
|
||||
"container_name/docker-compose",
|
||||
Compose(
|
||||
services=[
|
||||
Service(
|
||||
name="frontend",
|
||||
image="awesome/frontend",
|
||||
container_name="myfrontend",
|
||||
),
|
||||
],
|
||||
),
|
||||
),
|
||||
|
||||
],
|
||||
)
|
||||
def test_parse_file(test_file_path: str, expected: Compose) -> None:
|
||||
|
@ -275,3 +300,8 @@ def test_parse_file(test_file_path: str, expected: Compose) -> None:
|
|||
if (actual_service.extends is not None) and (expected_service.extends is not None):
|
||||
assert actual_service.extends.service_name == expected_service.extends.service_name
|
||||
assert actual_service.extends.from_file == expected_service.extends.from_file
|
||||
|
||||
|
||||
assert actual_service.cgroup_parent == expected_service.cgroup_parent
|
||||
assert actual_service.container_name == expected_service.container_name
|
||||
|
||||
|
|
Loading…
Reference in a new issue