From ac042cfcbae156c656d323af7884bdab95411d3b Mon Sep 17 00:00:00 2001 From: Ben Banfield-Zanin Date: Tue, 7 Apr 2026 16:37:50 +0100 Subject: [PATCH] Don't construct test resources YAML files with .txt in the filename --- newsfragments/1220.internal.md | 1 + tests/integration/scripts.py | 8 +++++--- 2 files changed, 6 insertions(+), 3 deletions(-) create mode 100644 newsfragments/1220.internal.md diff --git a/newsfragments/1220.internal.md b/newsfragments/1220.internal.md new file mode 100644 index 00000000..dc62b52b --- /dev/null +++ b/newsfragments/1220.internal.md @@ -0,0 +1 @@ +CI: output the YAML of resources into `.yaml` files rather than `.txt.yaml` files. diff --git a/tests/integration/scripts.py b/tests/integration/scripts.py index 7ba214e7..d88a388e 100644 --- a/tests/integration/scripts.py +++ b/tests/integration/scripts.py @@ -92,10 +92,12 @@ def collect_ess_logs(): # Get resources for resource in resources: - output_file = f"{destination}/{ns}/{resource}.txt" - run_command_to_file(f"kubectl --context=k3d-ess-helm get {resource} -n {ns}", output_file) + output_file_prefix = f"{destination}/{ns}/{resource}" run_command_to_file( - f"kubectl --context=k3d-ess-helm get {resource} -o yaml -n {ns}", f"{output_file}.yaml" + f"kubectl --context=k3d-ess-helm get {resource} -n {ns}", f"{output_file_prefix}.txt" + ) + run_command_to_file( + f"kubectl --context=k3d-ess-helm get {resource} -o yaml -n {ns}", f"{output_file_prefix}.yaml" ) # Get events