mirror of
https://github.com/rocky-linux/os-autoinst-distri-rocky.git
synced 2024-12-18 09:08:29 +00:00
Merge pull request #206 from nazunalika/develop
Add toolbox and other tests as POC's for testing inclusion
This commit is contained in:
commit
fe64a2888f
15
needles/console/console_in_toolbox-20240208.json
Normal file
15
needles/console/console_in_toolbox-20240208.json
Normal file
@ -0,0 +1,15 @@
|
||||
{
|
||||
"area": [
|
||||
{
|
||||
"xpos": 1,
|
||||
"type": "match",
|
||||
"height": 14,
|
||||
"ypos": 545,
|
||||
"width": 14
|
||||
}
|
||||
],
|
||||
"properties": [],
|
||||
"tags": [
|
||||
"console_in_toolbox"
|
||||
]
|
||||
}
|
@ -0,0 +1,16 @@
|
||||
{
|
||||
"area": [
|
||||
{
|
||||
"height": 18,
|
||||
"xpos": 14,
|
||||
"ypos": 128,
|
||||
"width": 132,
|
||||
"type": "match"
|
||||
}
|
||||
],
|
||||
"properties": [],
|
||||
"tags": [
|
||||
"ENV-DISTRI-rocky",
|
||||
"console_in_toolbox"
|
||||
]
|
||||
}
|
BIN
needles/console/rocky-toolbox-console_in_toolbox-20240208.png
Normal file
BIN
needles/console/rocky-toolbox-console_in_toolbox-20240208.png
Normal file
Binary file not shown.
After Width: | Height: | Size: 2.3 KiB |
@ -0,0 +1,16 @@
|
||||
{
|
||||
"area": [
|
||||
{
|
||||
"ypos": 744,
|
||||
"height": 22,
|
||||
"xpos": 14,
|
||||
"type": "match",
|
||||
"width": 135
|
||||
}
|
||||
],
|
||||
"properties": [],
|
||||
"tags": [
|
||||
"ENV-DISTRI-rocky",
|
||||
"console_in_toolbox"
|
||||
]
|
||||
}
|
BIN
needles/console/rocky-toolbox-console_in_toolbox-20240209.png
Normal file
BIN
needles/console/rocky-toolbox-console_in_toolbox-20240209.png
Normal file
Binary file not shown.
After Width: | Height: | Size: 74 KiB |
@ -1740,6 +1740,20 @@
|
||||
"USER_LOGIN": "false",
|
||||
"WORKER_CLASS": "tap"
|
||||
}
|
||||
},
|
||||
"toolbox": {
|
||||
"profiles": {
|
||||
"rocky-dvd-iso-aarch64-*-aarch64": 10,
|
||||
"rocky-dvd-iso-x86_64-*-64bit": 10
|
||||
},
|
||||
"settings": {
|
||||
"BOOTFROM": "c",
|
||||
"HDD_1": "disk_%FLAVOR%_%MACHINE%.qcow2",
|
||||
"POSTINSTALL": "toolbox",
|
||||
"START_AFTER_TEST": "%DEPLOY_UPLOAD_TEST%",
|
||||
"ROOT_PASSWORD": "weakpassword",
|
||||
"USER_LOGIN": "false"
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
41
tests/toolbox.pm
Normal file
41
tests/toolbox.pm
Normal file
@ -0,0 +1,41 @@
|
||||
# does a basic test of toolbox
|
||||
use base "installedtest";
|
||||
use strict;
|
||||
use testapi;
|
||||
use utils;
|
||||
|
||||
sub run {
|
||||
my $self = shift;
|
||||
my $version_major = get_version_major();
|
||||
assert_script_run "dnf install toolbox --assumeyes", 360 unless (get_var("CANNED"));
|
||||
assert_script_run "rpm -q toolbox";
|
||||
assert_script_run "toolbox create container_rl -y", 300;
|
||||
assert_script_run "toolbox list | grep container_rl";
|
||||
validate_script_output "toolbox run --container container_rl uname -a", sub { m/Linux toolbox/ };
|
||||
validate_script_output "toolbox run --container container_rl cat /etc/rocky-release", sub { m/Rocky Linux release $version_major/ };
|
||||
type_string "toolbox enter container_rl\n";
|
||||
assert_screen "console_in_toolbox", 180;
|
||||
type_string "exit\n";
|
||||
sleep 5;
|
||||
assert_script_run "clear";
|
||||
assert_script_run 'podman stop container_rl';
|
||||
assert_script_run "toolbox rm container_rl";
|
||||
assert_script_run "toolbox rmi --all --force";
|
||||
# pull fedora here as a quick test
|
||||
assert_script_run "toolbox -y create --distro fedora --release 39", 300;
|
||||
type_string "toolbox enter fedora-toolbox-39\n";
|
||||
assert_screen "console_in_toolbox", 180;
|
||||
type_string "exit\n";
|
||||
sleep 5;
|
||||
validate_script_output "toolbox run --distro fedora --release 39 cat /etc/fedora-release", sub { m/Fedora release 39 \(Thirty Nine\)/ };
|
||||
# clean up
|
||||
assert_script_run 'podman stop fedora-toolbox-39';
|
||||
assert_script_run "toolbox rm fedora-toolbox-39";
|
||||
assert_script_run "toolbox rmi --all --force";
|
||||
}
|
||||
|
||||
sub test_flags {
|
||||
return {fatal => 1};
|
||||
}
|
||||
|
||||
1;
|
Loading…
Reference in New Issue
Block a user