From f21946aaab905176ce210e30cdf1b821eb77b60d Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Dirk=20M=C3=BCller?= Date: Mon, 24 Jul 2023 12:15:12 +0200 Subject: [PATCH] move env APACHE_ENVVARS to optional It isn't set on tumbleweed. --- tests/test_php.py | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) diff --git a/tests/test_php.py b/tests/test_php.py index daadbb43..10a94e58 100644 --- a/tests/test_php.py +++ b/tests/test_php.py @@ -277,10 +277,11 @@ def get_env_var(env_var: str) -> str: ).is_file apache_envvars = get_env_var("APACHE_ENVVARS") - assert container_per_test.connection.file(apache_envvars).is_file - assert container_per_test.connection.run_expect( - [0], f"source {apache_envvars}" - ) + if apache_envvars: + assert container_per_test.connection.file(apache_envvars).is_file + assert container_per_test.connection.run_expect( + [0], f"source {apache_envvars}" + ) @pytest.mark.parametrize("container_image", [PHP_8_CLI])