integration/tests: Test project name override with COMPOSE_PROJECT_NAME env variable

Signed-off-by: Ruben Jenster <r.jenster@drachenfels.de>
This commit is contained in:
Ruben Jenster 2025-03-12 19:10:05 +01:00 committed by Ruben Jenster
parent 98b9bb9f8e
commit 1aa750bacf

View File

@ -67,3 +67,23 @@ class TestComposeEnv(unittest.TestCase, RunSubprocessMixin):
compose_yaml_path(),
"down",
])
def test_project_name_override(self):
try:
output, _ = self.run_subprocess_assert_returncode([
podman_compose_path(),
"-f",
compose_yaml_path(),
"run",
"-e",
"COMPOSE_PROJECT_NAME=project-name-override",
"project-name-test",
])
self.assertIn("project-name-override", str(output))
finally:
self.run_subprocess_assert_returncode([
podman_compose_path(),
"-f",
compose_yaml_path(),
"down",
])