diff options
author | Scott Moser <smoser@ubuntu.com> | 2018-01-25 12:26:34 -0700 |
---|---|---|
committer | Chad Smith <chad.smith@canonical.com> | 2018-01-25 12:26:34 -0700 |
commit | bc84f5023f795c261e32cf0690b2d29e12cfaedd (patch) | |
tree | 273896aca6e94badb3390aa87cfd240fe161d528 /tests/cloud_tests/verify.py | |
parent | bccee93d398ab26a3ee3b427b8f26a7de8375af3 (diff) | |
download | vyos-cloud-init-bc84f5023f795c261e32cf0690b2d29e12cfaedd.tar.gz vyos-cloud-init-bc84f5023f795c261e32cf0690b2d29e12cfaedd.zip |
tests: Collect script output as binary, collect systemd journal, fix lxd.
This adds collection a gzip compressed systemd journal on systemd systems.
The file can later be reviewed with:
zcat system.journal.gz > system.journal
journalctl --file=system.journal [-o short-monotonic ..]
To support this:
* modify test harness infrastructure to not assume content is utf-8.
* fix lxd platform to support make '_execute' return bytes rather
than a string. https://github.com/lxc/pylxd/issues/268
Also switched the base collectors to use /bin/sh as others already did.
Diffstat (limited to 'tests/cloud_tests/verify.py')
-rw-r--r-- | tests/cloud_tests/verify.py | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/tests/cloud_tests/verify.py b/tests/cloud_tests/verify.py index fc1efcfc..2a9fd520 100644 --- a/tests/cloud_tests/verify.py +++ b/tests/cloud_tests/verify.py @@ -29,7 +29,7 @@ def verify_data(base_dir, tests): data = {} test_dir = os.path.join(base_dir, test_name) for script_name in os.listdir(test_dir): - with open(os.path.join(test_dir, script_name), 'r') as fp: + with open(os.path.join(test_dir, script_name), 'rb') as fp: data[script_name] = fp.read() # get test suite and launch tests |