mirror of
https://github.com/rocky-linux/os-autoinst-distri-rocky.git
synced 2024-11-22 05:01:25 +00:00
Automate two 'mediakit' tests (repoclosure and file conflicts)
We can run these tests much like support_server - have a test which boots from the support_server disk image but with the ISO to be tested attached, then mounts it and runs the scripts. Signed-off-by: Adam Williamson <awilliam@redhat.com>
This commit is contained in:
parent
de4a58438b
commit
78dd42b876
118
templates
118
templates
@ -677,6 +677,28 @@
|
||||
},
|
||||
test_suite => { name => "support_server" },
|
||||
},
|
||||
{
|
||||
machine => { name => "64bit" },
|
||||
prio => 10,
|
||||
product => {
|
||||
arch => "x86_64",
|
||||
distri => "fedora",
|
||||
flavor => "Server-dvd-iso",
|
||||
version => "*",
|
||||
},
|
||||
test_suite => { name => "mediakit_fileconflicts" },
|
||||
},
|
||||
{
|
||||
machine => { name => "64bit" },
|
||||
prio => 10,
|
||||
product => {
|
||||
arch => "x86_64",
|
||||
distri => "fedora",
|
||||
flavor => "Server-dvd-iso",
|
||||
version => "*",
|
||||
},
|
||||
test_suite => { name => "mediakit_repoclosure" },
|
||||
},
|
||||
{
|
||||
machine => { name => "64bit" },
|
||||
prio => 30,
|
||||
@ -2111,6 +2133,30 @@
|
||||
},
|
||||
test_suite => { name => "support_server" },
|
||||
},
|
||||
{
|
||||
group_name => "Fedora PowerPC",
|
||||
machine => { name => "ppc64le" },
|
||||
prio => 10,
|
||||
product => {
|
||||
arch => "ppc64le",
|
||||
distri => "fedora",
|
||||
flavor => "Server-dvd-iso",
|
||||
version => "*",
|
||||
},
|
||||
test_suite => { name => "mediakit_fileconflicts" },
|
||||
},
|
||||
{
|
||||
group_name => "Fedora PowerPC",
|
||||
machine => { name => "ppc64le" },
|
||||
prio => 10,
|
||||
product => {
|
||||
arch => "ppc64le",
|
||||
distri => "fedora",
|
||||
flavor => "Server-dvd-iso",
|
||||
version => "*",
|
||||
},
|
||||
test_suite => { name => "mediakit_repoclosure" },
|
||||
},
|
||||
{
|
||||
group_name => "Fedora PowerPC",
|
||||
machine => { name => "ppc64le" },
|
||||
@ -2939,6 +2985,30 @@
|
||||
},
|
||||
test_suite => { name => "support_server" },
|
||||
},
|
||||
{
|
||||
group_name => "Fedora PowerPC",
|
||||
machine => { name => "ppc64" },
|
||||
prio => 10,
|
||||
product => {
|
||||
arch => "ppc64",
|
||||
distri => "fedora",
|
||||
flavor => "Server-dvd-iso",
|
||||
version => "*",
|
||||
},
|
||||
test_suite => { name => "mediakit_fileconflicts" },
|
||||
},
|
||||
{
|
||||
group_name => "Fedora PowerPC",
|
||||
machine => { name => "ppc64" },
|
||||
prio => 10,
|
||||
product => {
|
||||
arch => "ppc64",
|
||||
distri => "fedora",
|
||||
flavor => "Server-dvd-iso",
|
||||
version => "*",
|
||||
},
|
||||
test_suite => { name => "mediakit_repoclosure" },
|
||||
},
|
||||
{
|
||||
group_name => "Fedora PowerPC",
|
||||
machine => { name => "ppc64" },
|
||||
@ -3755,6 +3825,30 @@
|
||||
},
|
||||
test_suite => { name => "support_server" },
|
||||
},
|
||||
{
|
||||
group_name => "Fedora AArch64",
|
||||
machine => { name => "aarch64" },
|
||||
prio => 10,
|
||||
product => {
|
||||
arch => "aarch64",
|
||||
distri => "fedora",
|
||||
flavor => "Server-dvd-iso",
|
||||
version => "*",
|
||||
},
|
||||
test_suite => { name => "mediakit_fileconflicts" },
|
||||
},
|
||||
{
|
||||
group_name => "Fedora AArch64",
|
||||
machine => { name => "aarch64" },
|
||||
prio => 10,
|
||||
product => {
|
||||
arch => "aarch64",
|
||||
distri => "fedora",
|
||||
flavor => "Server-dvd-iso",
|
||||
version => "*",
|
||||
},
|
||||
test_suite => { name => "mediakit_repoclosure" },
|
||||
},
|
||||
{
|
||||
group_name => "Fedora AArch64",
|
||||
machine => { name => "aarch64" },
|
||||
@ -5864,6 +5958,30 @@
|
||||
{ key => "TEST_TARGET", value => "NONE" },
|
||||
],
|
||||
},
|
||||
{
|
||||
name => "mediakit_fileconflicts",
|
||||
settings => [
|
||||
# we use support server image here as we know it's available
|
||||
# and there's no need to wait on an install to run this
|
||||
{ key => "HDD_1", value => "disk_f%CURRREL%_support_5_%ARCH%.img" },
|
||||
{ key => "POSTINSTALL", value => "mediakit_fileconflicts" },
|
||||
{ key => "USER_LOGIN", value => "false" },
|
||||
{ key => "ROOT_PASSWORD", value => "weakpassword" },
|
||||
{ key => "BOOTFROM", value => "c" },
|
||||
],
|
||||
},
|
||||
{
|
||||
name => "mediakit_repoclosure",
|
||||
settings => [
|
||||
# we use support server image here as we know it's available
|
||||
# and there's no need to wait on an install to run this
|
||||
{ key => "HDD_1", value => "disk_f%CURRREL%_support_5_%ARCH%.img" },
|
||||
{ key => "POSTINSTALL", value => "mediakit_repoclosure" },
|
||||
{ key => "USER_LOGIN", value => "false" },
|
||||
{ key => "ROOT_PASSWORD", value => "weakpassword" },
|
||||
{ key => "BOOTFROM", value => "c" },
|
||||
],
|
||||
},
|
||||
{
|
||||
name => "install_no_user",
|
||||
settings => [
|
||||
|
26
tests/mediakit_fileconflicts.pm
Normal file
26
tests/mediakit_fileconflicts.pm
Normal file
@ -0,0 +1,26 @@
|
||||
use base "installedtest";
|
||||
use strict;
|
||||
use testapi;
|
||||
use utils;
|
||||
|
||||
sub run {
|
||||
# create a mount point for the ISO
|
||||
assert_script_run "mkdir -p /mnt/iso";
|
||||
# mount the ISO there
|
||||
assert_script_run "mount /dev/cdrom /mnt/iso";
|
||||
# download the check script
|
||||
assert_script_run "curl -o /usr/local/bin/potential_conflict.py https://pagure.io/fedora-qa/qa-misc/raw/master/f/potential_conflict.py";
|
||||
# install python2 and yum - script needs these for now:
|
||||
# https://pagure.io/fedora-qa/qa-misc/issue/4
|
||||
script_run "dnf -y install yum python2", 180;
|
||||
# run the check
|
||||
assert_script_run "python2 /usr/local/bin/potential_conflict.py --repofrompath=media,/mnt/iso -r media";
|
||||
}
|
||||
|
||||
sub test_flags {
|
||||
return { fatal => 1 };
|
||||
}
|
||||
|
||||
1;
|
||||
|
||||
# vim: set sw=4 et:
|
21
tests/mediakit_repoclosure.pm
Normal file
21
tests/mediakit_repoclosure.pm
Normal file
@ -0,0 +1,21 @@
|
||||
use base "installedtest";
|
||||
use strict;
|
||||
use testapi;
|
||||
use utils;
|
||||
|
||||
sub run {
|
||||
# create a mount point for the ISO
|
||||
assert_script_run "mkdir -p /mnt/iso";
|
||||
# mount the ISO there
|
||||
assert_script_run "mount /dev/cdrom /mnt/iso";
|
||||
# run the check
|
||||
assert_script_run "dnf repoclosure --repofrompath testdeps,/mnt/iso --repo testdeps";
|
||||
}
|
||||
|
||||
sub test_flags {
|
||||
return { fatal => 1 };
|
||||
}
|
||||
|
||||
1;
|
||||
|
||||
# vim: set sw=4 et:
|
Loading…
Reference in New Issue
Block a user