This is an automated email from the ASF dual-hosted git repository.

potiuk pushed a commit to branch main
in repository https://gitbox.apache.org/repos/asf/airflow.git


The following commit(s) were added to refs/heads/main by this push:
     new de5798196d2 Make Breeze Kubernetes image tests independent of the 
branch (#75724)
de5798196d2 is described below

commit de5798196d27e6d6ad0d01da9daa86e2e1c08f44
Author: Shahar Epstein <[email protected]>
AuthorDate: Tue Oct 27 19:40:37 2026 +0200

    Make Breeze Kubernetes image tests independent of the branch (#75724)
    
    The tests added in #75699 hardcoded `main` in the expected image
    names, so they fail on release branches such as `v3-4-test`, where
    `AIRFLOW_BRANCH` is different. Build the expected names from
    `AIRFLOW_BRANCH` instead.
---
 dev/breeze/tests/test_kubernetes_commands.py | 9 +++++----
 1 file changed, 5 insertions(+), 4 deletions(-)

diff --git a/dev/breeze/tests/test_kubernetes_commands.py 
b/dev/breeze/tests/test_kubernetes_commands.py
index a40e15660b8..971d7d0df58 100644
--- a/dev/breeze/tests/test_kubernetes_commands.py
+++ b/dev/breeze/tests/test_kubernetes_commands.py
@@ -22,6 +22,7 @@ from unittest import mock
 import pytest
 from click.testing import CliRunner
 
+from airflow_breeze.branch_defaults import AIRFLOW_BRANCH
 from airflow_breeze.commands import kubernetes_commands
 
 FORK_REPOSITORY = "contributor/airflow"
@@ -54,18 +55,18 @@ def 
test_rebuild_k8s_image_builds_from_the_image_of_the_github_repository(mock_e
     )
 
     assert returncode == 0
-    
mock_exists.assert_called_once_with(image="ghcr.io/contributor/airflow/main/prod/python3.11")
+    
mock_exists.assert_called_once_with(image=f"ghcr.io/contributor/airflow/{AIRFLOW_BRANCH}/prod/python3.11")
     command = mock_run_command.call_args.args[0]
     assert command[:4] == [
         "docker",
         "build",
         "--tag",
-        "ghcr.io/contributor/airflow/main/prod/python3.11-kubernetes:latest",
+        
f"ghcr.io/contributor/airflow/{AIRFLOW_BRANCH}/prod/python3.11-kubernetes:latest",
     ]
     assert (
         mock_run_command.call_args.kwargs["input"]
         .lstrip()
-        .startswith("FROM ghcr.io/contributor/airflow/main/prod/python3.11\n")
+        .startswith(f"FROM 
ghcr.io/contributor/airflow/{AIRFLOW_BRANCH}/prod/python3.11\n")
     )
 
 
@@ -78,7 +79,7 @@ def 
test_upload_k8s_image_loads_the_image_of_the_github_repository(mock_run_comm
     )
 
     assert mock_run_command.call_args.args[0][-1] == (
-        "ghcr.io/contributor/airflow/main/prod/python3.11-kubernetes"
+        
f"ghcr.io/contributor/airflow/{AIRFLOW_BRANCH}/prod/python3.11-kubernetes"
     )
 
 

Reply via email to