mirror of
https://pagure.io/fedora-qa/os-autoinst-distri-fedora.git
synced 2024-11-22 22:13:08 +00:00
Try to run Sumantro's test.
This commit is contained in:
parent
26befc3e6b
commit
96a63b712d
@ -2304,6 +2304,22 @@
|
|||||||
"USER_LOGIN": "false"
|
"USER_LOGIN": "false"
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
|
"toolbox": {
|
||||||
|
"profiles": {
|
||||||
|
"fedora-Server-dvd-iso-aarch64-*-aarch64": 30,
|
||||||
|
"fedora-Server-dvd-iso-ppc64le-*-ppc64le": 30,
|
||||||
|
"fedora-Server-dvd-iso-x86_64-*-64bit": 30
|
||||||
|
},
|
||||||
|
"settings": {
|
||||||
|
"BOOTFROM": "c",
|
||||||
|
"HDD_1": "disk_%FLAVOR%_%MACHINE%.qcow2",
|
||||||
|
"LOGIN_SNAPSHOT": "1",
|
||||||
|
"POSTINSTALL_PATH": "tests/toolbox",
|
||||||
|
"ROOT_PASSWORD": "weakpassword",
|
||||||
|
"START_AFTER_TEST": "%DEPLOY_UPLOAD_TEST%",
|
||||||
|
"USER_LOGIN": "false"
|
||||||
|
}
|
||||||
|
},
|
||||||
"dnf5": {
|
"dnf5": {
|
||||||
"profiles": {
|
"profiles": {
|
||||||
"fedora-Server-dvd-iso-aarch64-*-aarch64": 30,
|
"fedora-Server-dvd-iso-aarch64-*-aarch64": 30,
|
||||||
|
42
tests/toolbox.pm
Normal file
42
tests/toolbox.pm
Normal file
@ -0,0 +1,42 @@
|
|||||||
|
use base "installedtest";
|
||||||
|
use strict;
|
||||||
|
use warnings;
|
||||||
|
use testapi;
|
||||||
|
|
||||||
|
sub run {
|
||||||
|
my $self = shift;
|
||||||
|
$self->root_console(tty => 3);
|
||||||
|
# on non-canned flavors, we need to install toolbox
|
||||||
|
assert_script_run "dnf -y install toolbox", 240 unless (get_var("CANNED"));
|
||||||
|
# check toolbox is installed
|
||||||
|
assert_script_run "rpm -q toolbox";
|
||||||
|
# check to see if you can create a new toolbox container
|
||||||
|
assert_script_run "toolbox create container1 -y", 300;
|
||||||
|
# check to see if toolbox can list container
|
||||||
|
validate_script_output "toolbox list | grep container1", sub { m/container1/ };
|
||||||
|
# run a specific command on a given container
|
||||||
|
validate_script_output "toolbox run --container container1 uname -a", sub { m/Linux toolbox/ };
|
||||||
|
# enter container to test
|
||||||
|
assert_script_run "toolbox enter container1 ";
|
||||||
|
# Stop a conatiner
|
||||||
|
script_run 'podman stop container1';
|
||||||
|
# Toolbox remove container
|
||||||
|
assert_script_run "toolbox rm container1";
|
||||||
|
# Toolbox remove image and their dependant containers
|
||||||
|
assert_script_run "toolbox rmi --all --force";
|
||||||
|
# create a rhel image with distro and release flags
|
||||||
|
assert_script_run "toolbox create --distro rhel --release 9.1 -y", 300;
|
||||||
|
# validate rhel release file to ensure correct version
|
||||||
|
assert_script_run "toolbox enter rhel-toolbox-9.1";
|
||||||
|
#run a specific command on a given choice of distro and release
|
||||||
|
validate_script_output "toolbox run --distro rhel --release 9.1 cat /etc/redhat-release", sub { m/Red Hat Enterprise Linux release 9.1 (Plow)/ };
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
sub test_flags {
|
||||||
|
return {fatal => 1};
|
||||||
|
}
|
||||||
|
|
||||||
|
1;
|
||||||
|
|
||||||
|
# vim: set sw=4 et
|
Loading…
Reference in New Issue
Block a user