diff options
Diffstat (limited to 'tests/integration_tests/modules/test_persistence.py')
-rw-r--r-- | tests/integration_tests/modules/test_persistence.py | 26 |
1 files changed, 14 insertions, 12 deletions
diff --git a/tests/integration_tests/modules/test_persistence.py b/tests/integration_tests/modules/test_persistence.py index 00fdeaea..33527e1e 100644 --- a/tests/integration_tests/modules/test_persistence.py +++ b/tests/integration_tests/modules/test_persistence.py @@ -10,21 +10,23 @@ from tests.integration_tests.util import ( verify_ordered_items_in_text, ) - -PICKLE_PATH = Path('/var/lib/cloud/instance/obj.pkl') -TEST_PICKLE = ASSETS_DIR / 'trusty_with_mime.pkl' +PICKLE_PATH = Path("/var/lib/cloud/instance/obj.pkl") +TEST_PICKLE = ASSETS_DIR / "trusty_with_mime.pkl" @pytest.mark.lxd_container def test_log_message_on_missing_version_file(client: IntegrationInstance): client.push_file(TEST_PICKLE, PICKLE_PATH) client.restart() - assert client.execute('cloud-init status --wait').ok - log = client.read_from_file('/var/log/cloud-init.log') - verify_ordered_items_in_text([ - "Unable to unpickle datasource: 'MIMEMultipart' object has no " - "attribute 'policy'. Ignoring current cache.", - 'no cache found', - 'Searching for local data source', - 'SUCCESS: found local data from DataSourceNoCloud' - ], log) + assert client.execute("cloud-init status --wait").ok + log = client.read_from_file("/var/log/cloud-init.log") + verify_ordered_items_in_text( + [ + "Unable to unpickle datasource: 'MIMEMultipart' object has no " + "attribute 'policy'. Ignoring current cache.", + "no cache found", + "Searching for local data source", + "SUCCESS: found local data from DataSourceNoCloud", + ], + log, + ) |