From 6fefd092e989aad6600cb2884ead418baab29eca Mon Sep 17 00:00:00 2001 From: Adam Williamson Date: Tue, 20 Jun 2023 15:13:14 +0200 Subject: [PATCH] Try and fix Cockpit tests breaking with update ISO change We drop the line for the update ISO from /etc/fstab before uploading the image after the cockpit_default test, but we don't make sure it's set up again before Cockpit tries to use it, in the subsequent Cockpit tests. I don't know why this didn't fail on stg before, but it sure as hell is failing in prod... Signed-off-by: Adam Williamson --- lib/utils.pm | 4 ++-- tests/server_cockpit_autoupdate.pm | 3 +++ tests/server_cockpit_updates.pm | 3 +++ 3 files changed, 8 insertions(+), 2 deletions(-) diff --git a/lib/utils.pm b/lib/utils.pm index f02d225d..77d7cc22 100644 --- a/lib/utils.pm +++ b/lib/utils.pm @@ -540,11 +540,11 @@ sub _repo_setup_compose { sub _repo_setup_updates { # Appropriate repo setup steps for testing a Bodhi update - # Check if we already ran, bail if so - return unless script_run "test -f /root/.oqarsurun"; # sanity check die "_repo_setup_updates called, but ISO_2 is not attached!" unless (get_var("ISO_2")); mount_update_image; + # Check if we already ran, bail if so + return unless script_run "test -f /root/.oqarsurun"; my $version = get_var("VERSION"); my $currrel = get_var("CURRREL", "0"); my $arch = get_var("ARCH"); diff --git a/tests/server_cockpit_autoupdate.pm b/tests/server_cockpit_autoupdate.pm index 883cd056..23c6f69d 100644 --- a/tests/server_cockpit_autoupdate.pm +++ b/tests/server_cockpit_autoupdate.pm @@ -7,6 +7,9 @@ use cockpit; sub run { my $self = shift; + # on update flow, we need to ensure the ISO is mounted. this would + # be harmless but waste time on compose flow + repo_setup if (get_var("ADVISORY_OR_TASK")); # Start Cockpit start_cockpit(login => 1); diff --git a/tests/server_cockpit_updates.pm b/tests/server_cockpit_updates.pm index a7f76a12..8beee234 100644 --- a/tests/server_cockpit_updates.pm +++ b/tests/server_cockpit_updates.pm @@ -7,6 +7,9 @@ use cockpit; sub run { my $self = shift; + # on update flow, we need to ensure the ISO is mounted. this would + # be harmless but waste time on compose flow + repo_setup if (get_var("ADVISORY_OR_TASK")); my $cockdate = "0"; # Remove a package, disable repositories and enable test repositories, install the package