From fda8a99edb64021cfe99492708dd6d1ffb91024d Mon Sep 17 00:00:00 2001 From: Jarek Potiuk Date: Thu, 26 Jun 2025 22:46:49 +0200 Subject: [PATCH] [v3-0-test] Skip test that needs the .git folder when it is missing (#52305) When you run breeze tests in breeze - by default .git folder is missing because it is not mounted to inside breeze. This can be remediated with `breeze shell --mount all` but this test should simply not run if .git folder is missing. (cherry picked from commit 9275f7b284bc57377eba30b766d1fef21a636ffc) Co-authored-by: Jarek Potiuk --- dev/breeze/tests/test_selective_checks.py | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/dev/breeze/tests/test_selective_checks.py b/dev/breeze/tests/test_selective_checks.py index 3adeb4810a840..6f37281de95aa 100644 --- a/dev/breeze/tests/test_selective_checks.py +++ b/dev/breeze/tests/test_selective_checks.py @@ -36,6 +36,7 @@ ) from airflow_breeze.utils.functools_cache import clearable_cache from airflow_breeze.utils.packages import get_available_distributions +from airflow_breeze.utils.path_utils import AIRFLOW_ROOT_PATH from airflow_breeze.utils.selective_checks import ( ALL_CI_SELECTIVE_TEST_TYPES, SelectiveChecks, @@ -1274,6 +1275,10 @@ def test_expected_output_pull_request_main( assert_outputs_are_printed(expected_outputs, str(stderr)) +@pytest.mark.skipif( + not (AIRFLOW_ROOT_PATH / ".git").exists(), + reason="This test should not run if .git folder is missing (for example by default in breeze container)", +) @pytest.mark.parametrize( "files, commit_ref, expected_outputs", [