diff options
author | Scott Moser <smoser@brickies.net> | 2017-01-20 10:06:55 -0500 |
---|---|---|
committer | Scott Moser <smoser@brickies.net> | 2017-01-20 10:06:55 -0500 |
commit | d00b7dba8767618ae360f56bf64b7ab7a8c49d2e (patch) | |
tree | 349799f76c39669a03a6acbd48502970c0abb994 /tests/cloud_tests/testcases/modules/write_files.py | |
parent | fa3009b64949fef3744ddb940f01477dfa2d25e5 (diff) | |
parent | 7fb6f78177b5ece10ca7c54ba3958010a9987f06 (diff) | |
download | vyos-cloud-init-d00b7dba8767618ae360f56bf64b7ab7a8c49d2e.tar.gz vyos-cloud-init-d00b7dba8767618ae360f56bf64b7ab7a8c49d2e.zip |
merge from 0.7.9 at 0.7.9
Diffstat (limited to 'tests/cloud_tests/testcases/modules/write_files.py')
-rw-r--r-- | tests/cloud_tests/testcases/modules/write_files.py | 30 |
1 files changed, 30 insertions, 0 deletions
diff --git a/tests/cloud_tests/testcases/modules/write_files.py b/tests/cloud_tests/testcases/modules/write_files.py new file mode 100644 index 00000000..97dfeec3 --- /dev/null +++ b/tests/cloud_tests/testcases/modules/write_files.py @@ -0,0 +1,30 @@ +# This file is part of cloud-init. See LICENSE file for license information. + +"""cloud-init Integration Test Verify Script""" +from tests.cloud_tests.testcases import base + + +class TestWriteFiles(base.CloudTestCase): + """Example cloud-config test""" + + def test_b64(self): + """Test b64 encoded file reads as ascii""" + out = self.get_data_file('file_b64') + self.assertIn('ASCII text', out) + + def test_binary(self): + """Test binary file reads as executable""" + out = self.get_data_file('file_binary') + self.assertIn('ELF 64-bit LSB executable, x86-64, version 1', out) + + def test_gzip(self): + """Test gzip file shows up as a shell script""" + out = self.get_data_file('file_gzip') + self.assertIn('POSIX shell script, ASCII text executable', out) + + def test_text(self): + """Test text shows up as ASCII text""" + out = self.get_data_file('file_text') + self.assertIn('ASCII text', out) + +# vi: ts=4 expandtab |