From 1aa750bacfa0fa629642713f956b144d3d41ba21 Mon Sep 17 00:00:00 2001 From: Ruben Jenster Date: Wed, 12 Mar 2025 19:10:05 +0100 Subject: [PATCH] integration/tests: Test project name override with COMPOSE_PROJECT_NAME env variable Signed-off-by: Ruben Jenster --- .../env-tests/test_podman_compose_env.py | 20 +++++++++++++++++++ 1 file changed, 20 insertions(+) diff --git a/tests/integration/env-tests/test_podman_compose_env.py b/tests/integration/env-tests/test_podman_compose_env.py index 3d50a07..f1c35cf 100644 --- a/tests/integration/env-tests/test_podman_compose_env.py +++ b/tests/integration/env-tests/test_podman_compose_env.py @@ -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", + ])