1
0
mirror of https://pagure.io/fedora-qa/os-autoinst-distri-fedora.git synced 2024-11-26 07:33:09 +00:00

Revert "Fix desktop_update_graphical tests for pykickstart updates"

This reverts commit 2e5fa93415.
Let's try using one non-critpath package for all these tests
instead.
This commit is contained in:
Adam Williamson 2023-03-18 09:39:19 -07:00
parent bac28124a0
commit 38c3693684
2 changed files with 10 additions and 21 deletions

View File

@ -9,17 +9,15 @@ use testapi;
our @EXPORT = qw/prepare_test_packages verify_installed_packages verify_updated_packages/; our @EXPORT = qw/prepare_test_packages verify_installed_packages verify_updated_packages/;
# enable the openqa test package repositories and install the main # enable the openqa test package repositories and install the main
# test packages, remove test package and install the fake one # test packages, remove python3-kickstart and install the fake one
sub prepare_test_packages { sub prepare_test_packages {
my ($package) = @_;
$package //= "python3-kickstart";
# remove python3-kickstart if installed (we don't use assert # remove python3-kickstart if installed (we don't use assert
# here in case it's not) # here in case it's not)
script_run "dnf -y remove $package", 180; script_run 'dnf -y remove python3-kickstart', 180;
# grab the test repo definitions # grab the test repo definitions
assert_script_run 'curl -o /etc/yum.repos.d/openqa-testrepo-1.repo https://fedorapeople.org/groups/qa/openqa-repos/openqa-testrepo-1.repo'; assert_script_run 'curl -o /etc/yum.repos.d/openqa-testrepo-1.repo https://fedorapeople.org/groups/qa/openqa-repos/openqa-testrepo-1.repo';
# install the test packages from repo1 # install the test packages from repo1
assert_script_run "dnf -y --disablerepo=* --enablerepo=openqa-testrepo-1 install $package"; assert_script_run 'dnf -y --disablerepo=* --enablerepo=openqa-testrepo-1 install python3-kickstart';
if (get_var("DESKTOP") eq 'kde' && get_var("TEST") eq 'desktop_update_graphical') { if (get_var("DESKTOP") eq 'kde' && get_var("TEST") eq 'desktop_update_graphical') {
# kick pkcon so our special update will definitely get installed # kick pkcon so our special update will definitely get installed
assert_script_run 'pkcon refresh force'; assert_script_run 'pkcon refresh force';
@ -29,19 +27,15 @@ sub prepare_test_packages {
# check our test packages installed correctly (this is a test that dnf # check our test packages installed correctly (this is a test that dnf
# actually does what it claims) # actually does what it claims)
sub verify_installed_packages { sub verify_installed_packages {
my ($package) = @_; validate_script_output 'rpm -q python3-kickstart', sub { $_ =~ m/^python3-kickstart-1.1.noarch$/ };
$package //= "python3-kickstart"; assert_script_run 'rpm -V python3-kickstart';
validate_script_output "rpm -q $package", sub { $_ =~ m/^$package-1.1.noarch$/ };
assert_script_run "rpm -V $package";
} }
# check updating the test packages and the fake python3-kickstart work # check updating the test packages and the fake python3-kickstart work
# as expected # as expected
sub verify_updated_packages { sub verify_updated_packages {
my ($package) = @_; # we don't know what version of python3-kickstart we'll actually
$package //= "python3-kickstart";
# we don't know what version of the test package we'll actually
# get, so just check it's *not* the fake one # get, so just check it's *not* the fake one
validate_script_output "rpm -q $package", sub { $_ !~ m/^$package-1-1.noarch$/ }; validate_script_output 'rpm -q python3-kickstart', sub { $_ !~ m/^python3-kickstart-1-1.noarch$/ };
assert_script_run "rpm -V $package"; assert_script_run 'rpm -V python3-kickstart';
} }

View File

@ -17,12 +17,7 @@ sub run {
if (get_var("ADVISORY_OR_TASK") && get_var("VERSION") eq get_var("RAWREL")) { if (get_var("ADVISORY_OR_TASK") && get_var("VERSION") eq get_var("RAWREL")) {
assert_script_run 'dnf config-manager --set-disabled koji-rawhide'; assert_script_run 'dnf config-manager --set-disabled koji-rawhide';
} }
# for tests of pykickstart updates, we need to use a different dummy prepare_test_packages;
my $package = "python3-kickstart";
if (get_var("ADVISORY_OR_TASK")) {
$package = "python3-blivet" unless (script_run "grep python3-kickstart /mnt/updatepkgs.txt");
}
prepare_test_packages $package;
# get back to the desktop # get back to the desktop
desktop_vt; desktop_vt;
@ -140,7 +135,7 @@ sub run {
} }
# back to console to verify updates # back to console to verify updates
$self->root_console(tty => 3); $self->root_console(tty => 3);
verify_updated_packages $package; verify_updated_packages;
} }
sub test_flags { sub test_flags {