Skip to content

Commit

Permalink
Switch kuberenetes_tests to run with uv run (apache#42836)
Browse files Browse the repository at this point in the history
This is a no-op change right now, but as part of the provider re-org in apache#42505
this sets us up to be able to load the providers code in the tests

The reason this change is done separately is that changes to breeze code form
forks doesn't take effect, and this small change makes it easier to land on
main without having to re-create that large PR.
  • Loading branch information
ashb authored and ellisms committed Nov 13, 2024
1 parent be37f7b commit 808c601
Showing 1 changed file with 2 additions and 3 deletions.
5 changes: 2 additions & 3 deletions dev/breeze/src/airflow_breeze/commands/kubernetes_commands.py
Original file line number Diff line number Diff line change
Expand Up @@ -1429,15 +1429,14 @@ def _run_tests(
extra_shell_args.append("--no-rcs")
elif shell_binary.endswith("bash"):
extra_shell_args.extend(["--norc", "--noprofile"])
the_tests: list[str] = []
command_to_run = " ".join([quote(arg) for arg in ["pytest", *the_tests, *test_args]])
the_tests: list[str] = ["kubernetes_tests/"]
command_to_run = " ".join([quote(arg) for arg in ["uv", "run", "pytest", *the_tests, *test_args]])
get_console(output).print(f"[info] Command to run:[/] {command_to_run}")
result = run_command(
[shell_binary, *extra_shell_args, "-c", command_to_run],
output=output,
env=env,
check=False,
cwd="kubernetes_tests",
)
return result.returncode, f"Tests {kubectl_cluster_name}"

Expand Down

0 comments on commit 808c601

Please sign in to comment.