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
This commit is contained in:
Clark Boylan 2022-08-31 13:10:18 -07:00
parent 1513ab45bb
commit fbdd81f789
1 changed files with 17 additions and 1 deletions

View File

@ -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