From fbdd81f78915ab80706189b2b93b770a79f89d38 Mon Sep 17 00:00:00 2001 From: Clark Boylan Date: Wed, 31 Aug 2022 13:10:18 -0700 Subject: [PATCH] Exercise stage-output extensions_to_txt in testing This updates our stage-output test to exercise the extensions_to_txt behavior. Do this as we've seen the performance of these tasks is quite poor. Testing will help us improve this without breaking things. Change-Id: I35844fa438773b4789e7f1e4d223bd59d5df7ba7 --- test-playbooks/stage-output.yaml | 18 +++++++++++++++++- 1 file changed, 17 insertions(+), 1 deletion(-) diff --git a/test-playbooks/stage-output.yaml b/test-playbooks/stage-output.yaml index 2c97f46b8..78c8c7460 100644 --- a/test-playbooks/stage-output.yaml +++ b/test-playbooks/stage-output.yaml @@ -4,12 +4,28 @@ copy: content: "Test file" dest: "/tmp/test-output.txt" - - name: Test stage-output with a file + - name: Write a second test file + copy: + content: "Second test file" + dest: "/tmp/test-output.log" + - name: Test stage-output with explicit files include_role: name: stage-output vars: zuul_copy_output: /tmp/test-output.txt: logs + /tmp/test-output.log: logs + extensions_to_txt: + log: true + txt: false + - name: Check the file was renamed + stat: + path: /home/zuul/logs/test-output_log.txt + register: renamed_file_stat + - name: Fail if file was not renamed + fail: + msg: "Renamed test-output log file does not exist." + when: not renamed_file_stat.stat.exists - name: Test stage-output with no input include_role: name: stage-output