diff options
| author | Chad Smith <chad.smith@canonical.com> | 2018-10-03 12:10:23 -0600 |
|---|---|---|
| committer | Chad Smith <chad.smith@canonical.com> | 2018-10-03 12:10:23 -0600 |
| commit | d6347e1c439eda7f43d9620dac2b461e980e1ae9 (patch) | |
| tree | 08410263488d11a2a29edcc620575ed1b028100e /tests/cloud_tests/testcases/modules/write_files.yaml | |
| parent | 564793a76b9c9add1ee81bab4919c8dccd45a33d (diff) | |
| parent | e28000457591bde9f22d6b7a538b1fc33349d780 (diff) | |
| download | vyos-cloud-init-d6347e1c439eda7f43d9620dac2b461e980e1ae9.tar.gz vyos-cloud-init-d6347e1c439eda7f43d9620dac2b461e980e1ae9.zip | |
merge from master at 18.4
Diffstat (limited to 'tests/cloud_tests/testcases/modules/write_files.yaml')
| -rw-r--r-- | tests/cloud_tests/testcases/modules/write_files.yaml | 15 |
1 files changed, 11 insertions, 4 deletions
diff --git a/tests/cloud_tests/testcases/modules/write_files.yaml b/tests/cloud_tests/testcases/modules/write_files.yaml index ce936b7b..cc7ea4bd 100644 --- a/tests/cloud_tests/testcases/modules/write_files.yaml +++ b/tests/cloud_tests/testcases/modules/write_files.yaml @@ -3,6 +3,13 @@ # # NOTE: on trusty 'file' has an output formatting error for binary files and # has 2 spaces in 'LSB executable', which causes a failure here +# +# NOTE: the binary data can be any binary data, not only executables +# and can be generated via the base 64 command as such: +# $ base64 < hello > hello.txt +# the opposite is running: +# $ base64 -d < hello.txt > hello +# required_features: - no_file_fmt_e cloud_config: | @@ -19,9 +26,7 @@ cloud_config: | SMBDOPTIONS="-D" path: /root/file_text - content: !!binary | - f0VMRgIBAQAAAAAAAAAAAAIAPgABAAAAwARAAAAAAABAAAAAAAAAAJAVAAAAAAAAAAAAAEAAOAAI - AEAAHgAdAAYAAAAFAAAAQAAAAAAAAABAAEAAAAAAAEAAQAAAAAAAwAEAAAAAAADAAQAAAAAAAAgA - AAAAAAAAAwAAAAQAAAAAAgAAAAAAAAACQAAAAAAAAAJAAAAAAAAcAAAAAAAAABwAAAAAAAAAAQAA + /Z/xrHR4WINT0UNoKPQKbuovp6+Js+JK path: /root/file_binary permissions: '0555' - encoding: gzip @@ -38,7 +43,9 @@ collect_scripts: file /root/file_text file_binary: | #!/bin/bash - file /root/file_binary + for hasher in md5sum sha256sum; do + $hasher </root/file_binary && break + done file_gzip: | #!/bin/bash file /root/file_gzip |
