diff --git a/templates.fif.json b/templates.fif.json index 77605908..0edd459e 100644 --- a/templates.fif.json +++ b/templates.fif.json @@ -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" diff --git a/tests/toolbox.pm b/tests/toolbox.pm index 0a0258f5..b35903d7 100644 --- a/tests/toolbox.pm +++ b/tests/toolbox.pm @@ -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); }