From 0bba2d452ed8edb2bbd3e45201ecf94b06507463 Mon Sep 17 00:00:00 2001 From: Chad Smith Date: Wed, 28 Feb 2024 12:00:33 -0700 Subject: [PATCH] tests: upgrade tests should only validate current boot log In upgrade tests, we should only validate clean log on the latest boot to avoid false positives for warnings/errors which were removed by upgrade. --- tests/integration_tests/test_upgrade.py | 2 ++ 1 file changed, 2 insertions(+) diff --git a/tests/integration_tests/test_upgrade.py b/tests/integration_tests/test_upgrade.py index 0cdee8bb9a8..e0d5b3219e5 100644 --- a/tests/integration_tests/test_upgrade.py +++ b/tests/integration_tests/test_upgrade.py @@ -203,6 +203,8 @@ def test_subsequent_boot_of_upgraded_package(session_cloud: IntegrationCloud): with session_cloud.launch(launch_kwargs=launch_kwargs) as instance: instance.install_new_cloud_init(source, clean=False) + # Ensure we aren't looking at any prior warnings/errors from prior boot + instance.execute("rm /var/log/cloud-init.log") instance.restart() log = instance.read_from_file("/var/log/cloud-init.log") verify_clean_log(log)