feat: implement new test case
This commit is contained in:
parent
50589db102
commit
747dd06be1
1 changed files with 34 additions and 0 deletions
|
@ -176,6 +176,35 @@ class Parser:
|
|||
if service_data.links is not None:
|
||||
service_links = service_data.links
|
||||
|
||||
|
||||
cgroup_parent: Optional[str] = None
|
||||
if service_data.cgroup_parent is not None:
|
||||
cgroup_parent = service_data.cgroup_parent
|
||||
|
||||
container_name: Optional[str] = None
|
||||
if service_data.container_name is not None:
|
||||
container_name = service_data.container_name
|
||||
|
||||
|
||||
env_file: List[str] = []
|
||||
if service_data.env_file is not None:
|
||||
if type(service_data.env_file) is spec.StringOrList:
|
||||
if(type(service_data.env_file.__root__) is spec.ListOfStrings):
|
||||
env_file = service_data.env_file.__root__.__root__
|
||||
elif(type(service_data.env_file.__root__) is str):
|
||||
env_file.append(service_data.env_file.__root__)
|
||||
|
||||
|
||||
expose: List[str] = []
|
||||
if service_data.expose is not None:
|
||||
expose = service_data.expose
|
||||
|
||||
profiles: List[str] = []
|
||||
if service_data.profiles is not None:
|
||||
if type(service_data.profiles) is spec.ListOfStrings:
|
||||
profiles = service_data.profiles.__root__
|
||||
|
||||
|
||||
services.append(
|
||||
Service(
|
||||
name=service_name,
|
||||
|
@ -186,6 +215,11 @@ class Parser:
|
|||
depends_on=service_depends_on,
|
||||
volumes=service_volumes,
|
||||
links=service_links,
|
||||
cgroup_parent=cgroup_parent,
|
||||
container_name=container_name,
|
||||
env_file=env_file,
|
||||
expose=expose,
|
||||
profiles=profiles,
|
||||
)
|
||||
)
|
||||
|
||||
|
|
Loading…
Reference in a new issue