From 426747c36892c18a665da9368dde50453492be12 Mon Sep 17 00:00:00 2001 From: Adam Williamson Date: Sun, 18 Jun 2023 11:15:56 +0200 Subject: [PATCH] Adjust modularity_tests to enable the modular repos at the start As of yesterday's Rawhide, the modular repos are not installed by default, so of course all the modular tests fail. So, install the repos before running the tests. This isn't conditionalized on release version as I don't think we ever run this test on anything other than Rawhide and Branched. Signed-off-by: Adam Williamson --- templates.fif.json | 3 +-- tests/modularity_setup.pm | 20 ++++++++++++++++++++ 2 files changed, 21 insertions(+), 2 deletions(-) create mode 100644 tests/modularity_setup.pm diff --git a/templates.fif.json b/templates.fif.json index fdaba089..d5a19c96 100644 --- a/templates.fif.json +++ b/templates.fif.json @@ -2242,8 +2242,7 @@ "settings": { "BOOTFROM": "c", "HDD_1": "disk_%FLAVOR%_%MACHINE%.qcow2", - "LOGIN_SNAPSHOT": "1", - "POSTINSTALL": "modularity_module_list modularity_enable_disable_module modularity_install_module", + "POSTINSTALL": "modularity_setup modularity_module_list modularity_enable_disable_module modularity_install_module", "ROOT_PASSWORD": "weakpassword", "START_AFTER_TEST": "%DEPLOY_UPLOAD_TEST%", "USER_LOGIN": "false" diff --git a/tests/modularity_setup.pm b/tests/modularity_setup.pm new file mode 100644 index 00000000..2cea705d --- /dev/null +++ b/tests/modularity_setup.pm @@ -0,0 +1,20 @@ +use base "installedtest"; +use strict; +use modularity; +use testapi; +use utils; + +sub run { + # switch to tty and login as root + $self->root_console(tty => 3); + # modular repos are not installed by default since F39 + assert_script_run "dnf -y install fedora-repos-modular"; +} + +sub test_flags { + return {fatal => 1, milestone => 1}; +} + +1; + +# vim: set sw=4 et: