1
0
mirror of https://pagure.io/fedora-qa/os-autoinst-distri-fedora.git synced 2024-11-22 05:53:09 +00:00

Make test run in openQA

This commit is contained in:
Lukas Ruzicka 2023-07-19 11:23:34 +02:00
parent 96a63b712d
commit 445ef5a7eb
2 changed files with 10 additions and 5 deletions

View File

@ -2314,7 +2314,7 @@
"BOOTFROM": "c",
"HDD_1": "disk_%FLAVOR%_%MACHINE%.qcow2",
"LOGIN_SNAPSHOT": "1",
"POSTINSTALL_PATH": "tests/toolbox",
"POSTINSTALL": "toolbox",
"ROOT_PASSWORD": "weakpassword",
"START_AFTER_TEST": "%DEPLOY_UPLOAD_TEST%",
"USER_LOGIN": "false"

View File

@ -17,7 +17,10 @@ sub run {
# 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 ";
enter_cmd("toolbox enter container1");
validate_script_output("cat /etc/fedora-release", sub { m/Fedora release/ });
enter_cmd("exit");
sleep(2);
# Stop a conatiner
script_run 'podman stop container1';
# Toolbox remove container
@ -26,10 +29,12 @@ sub run {
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)/ };
#validate_script_output "toolbox run --distro rhel --release 9.1 cat /etc/redhat-release", sub { m/Red Hat Enterprise Linux release 9.1 (Plow)/ };
# validate rhel release file to ensure correct version
enter_cmd("toolbox enter rhel-toolbox-9.1");
validate_script_output("cat /etc/redhat-release", sub { m/Red Hat Enterprise Linux/ });
sleep(5);
}