Skip to content

Commit 939a212

Browse files
committed
test/integration: Test top-level name interpolation
Refs #1319 Signed-off-by: Jonathan Sling <slingjonathan@gmail.com>
1 parent cf4951a commit 939a212

File tree

2 files changed

+21
-1
lines changed

2 files changed

+21
-1
lines changed

tests/integration/env_tests/container-compose.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
version: "3"
22

3-
name: my-project-name
3+
name: my-project-name${ZZVAR1:-}
44

55
services:
66
env-test:

tests/integration/env_tests/test_podman_compose_env.py

Lines changed: 20 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -87,3 +87,23 @@ def test_project_name_override(self) -> None:
8787
compose_yaml_path(),
8888
"down",
8989
])
90+
91+
def test_project_name_interpolation(self) -> None:
92+
try:
93+
output, _ = self.run_subprocess_assert_returncode([
94+
podman_compose_path(),
95+
"-f",
96+
compose_yaml_path(),
97+
"run",
98+
"-e",
99+
"ZZVAR1=-myval2",
100+
"project-name-test",
101+
])
102+
self.assertIn("my-project-name-myval2", str(output))
103+
finally:
104+
self.run_subprocess_assert_returncode([
105+
podman_compose_path(),
106+
"-f",
107+
compose_yaml_path(),
108+
"down",
109+
])

0 commit comments

Comments
 (0)