From 5cd9c83e73eb2de652239600f1d0e7f9ca7f3208 Mon Sep 17 00:00:00 2001 From: Adam Williamson Date: Thu, 25 Apr 2024 16:52:09 -0700 Subject: [PATCH] Ensure repos are set up for cockpit tests When running these tests on updates we inherit the main disk image from server_cockpit_default, which has the repo config, but the actual repo data is on HDD_3 which is not inherited. We need to re-download the updates here to ensure they're available to the tests (the automatic update test installs the dnf-automatic package, so it should pull it from the update repo if it is part of the update being tested). Signed-off-by: Adam Williamson --- main.pm | 2 -- templates.fif.json | 2 +- tests/{_snapshot_only.pm => _cockpit_setup.pm} | 2 ++ 3 files changed, 3 insertions(+), 3 deletions(-) rename tests/{_snapshot_only.pm => _cockpit_setup.pm} (62%) diff --git a/main.pm b/main.pm index 876a9137..e9952340 100644 --- a/main.pm +++ b/main.pm @@ -248,7 +248,6 @@ sub _load_early_postinstall_tests { # Appropriate login method for install type if (get_var("DESKTOP")) { _load_instance("tests/_graphical_wait_login", $instance); - _load_instance("tests/_snapshot_only") if (get_var("LOGIN_SNAPSHOT")); } # Test non-US input at this point, on language tests if (get_var("SWITCHED_LAYOUT") || get_var("INPUT_METHOD")) { @@ -264,7 +263,6 @@ sub _load_early_postinstall_tests { # the installation is interrupted on purpose. unless (get_var("DESKTOP") || get_var("CRASH_REPORT")) { _load_instance("tests/_console_wait_login", $instance); - _load_instance("tests/_snapshot_only") if (get_var("LOGIN_SNAPSHOT")); } } diff --git a/templates.fif.json b/templates.fif.json index 034466d4..3c162ebc 100644 --- a/templates.fif.json +++ b/templates.fif.json @@ -2594,7 +2594,7 @@ "+START_AFTER_TEST": "server_cockpit_default", "BOOTFROM": "c", "LOGIN_SNAPSHOT": "1", - "POSTINSTALL": "server_cockpit_updates server_cockpit_autoupdate", + "POSTINSTALL": "_cockpit_setup server_cockpit_updates server_cockpit_autoupdate", "ROOT_PASSWORD": "weakpassword", "USER_LOGIN": "false" } diff --git a/tests/_snapshot_only.pm b/tests/_cockpit_setup.pm similarity index 62% rename from tests/_snapshot_only.pm rename to tests/_cockpit_setup.pm index 084f537d..56e606f2 100644 --- a/tests/_snapshot_only.pm +++ b/tests/_cockpit_setup.pm @@ -5,6 +5,8 @@ use utils; sub run { my $self = shift; + # for update testing, ensure the update repos are set up + repo_setup if (get_var("ADVISORY_OR_TASK")); } sub test_flags {