diff options
author | Joshua Powers <josh.powers@canonical.com> | 2018-08-20 18:29:26 +0000 |
---|---|---|
committer | Server Team CI Bot <josh.powers+server-team-bot@canonical.com> | 2018-08-20 18:29:26 +0000 |
commit | a03ed8bf77add3ed920137e4cc6986caa414d1da (patch) | |
tree | b9a67757de1e4647c6cfda8f9802c26ec80ec168 /tests/cloud_tests/testcases/modules/write_files.py | |
parent | aaffd59431fe05932a66016db941fe197c4e7620 (diff) | |
download | vyos-cloud-init-a03ed8bf77add3ed920137e4cc6986caa414d1da.tar.gz vyos-cloud-init-a03ed8bf77add3ed920137e4cc6986caa414d1da.zip |
tests: disable snap, fix write_files binary
The snap test requires access to a proxy and currently the integration
tests do not handle this scenario. I am disabling the test untill I can
loop back around and fix this.
The write_files test, specifically, the binary test is failing on cosmic
because the "binary" file we were writting was not a complete elf
executable, but we expected 'file' to identify it as such.
The change here is to simply use some 24 bytes of random, non-utf data
and check that file was written correctly via expected checksum.
Diffstat (limited to 'tests/cloud_tests/testcases/modules/write_files.py')
-rw-r--r-- | tests/cloud_tests/testcases/modules/write_files.py | 7 |
1 files changed, 5 insertions, 2 deletions
diff --git a/tests/cloud_tests/testcases/modules/write_files.py b/tests/cloud_tests/testcases/modules/write_files.py index 7bd520f6..526a2ebd 100644 --- a/tests/cloud_tests/testcases/modules/write_files.py +++ b/tests/cloud_tests/testcases/modules/write_files.py @@ -14,8 +14,11 @@ class TestWriteFiles(base.CloudTestCase): 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) + out = self.get_data_file('file_binary').strip() + md5 = "3801184b97bb8c6e63fa0e1eae2920d7" + sha256 = ("2c791c4037ea5bd7e928d6a87380f8ba7a803cd83d" + "5e4f269e28f5090f0f2c9a") + self.assertIn(out, (md5 + " -", sha256 + " -")) def test_gzip(self): """Test gzip file shows up as a shell script.""" |