From 390a3133370c536b529ac3ca336620c2e8c70a57 Mon Sep 17 00:00:00 2001 From: mbussolotto Date: Tue, 18 Jul 2023 10:18:28 +0200 Subject: [PATCH] testsuite: do not install or remove formula if in container --- .../features/init_clients/proxy_branch_network.feature | 1 + testsuite/features/secondary/allcli_system_group.feature | 1 + testsuite/features/secondary/min_salt_formulas.feature | 1 + .../secondary/srv_user_configuration_salt_states.feature | 8 +++++++- testsuite/features/step_definitions/salt_steps.rb | 1 + 5 files changed, 11 insertions(+), 1 deletion(-) diff --git a/testsuite/features/init_clients/proxy_branch_network.feature b/testsuite/features/init_clients/proxy_branch_network.feature index e49a45b5cb50..7ab8e7e1ba20 100644 --- a/testsuite/features/init_clients/proxy_branch_network.feature +++ b/testsuite/features/init_clients/proxy_branch_network.feature @@ -21,6 +21,7 @@ Feature: Setup Uyuni for Retail branch network @proxy @private_net +@skip_if_container_server Scenario: Install or update branch network formulas on the server When I manually install the "branch-network" formula on the server And I manually install the "dhcpd" formula on the server diff --git a/testsuite/features/secondary/allcli_system_group.feature b/testsuite/features/secondary/allcli_system_group.feature index fca19b05ed0e..109e26cf7f59 100644 --- a/testsuite/features/secondary/allcli_system_group.feature +++ b/testsuite/features/secondary/allcli_system_group.feature @@ -105,6 +105,7 @@ Feature: Manage a group of systems # Red Hat-like minion is intentionally not removed from group + @skip_if_container_server Scenario: Cleanup: uninstall formula from the server When I manually uninstall the "locale" formula from the server diff --git a/testsuite/features/secondary/min_salt_formulas.feature b/testsuite/features/secondary/min_salt_formulas.feature index 2528e3f7917a..d5177dcc453e 100644 --- a/testsuite/features/secondary/min_salt_formulas.feature +++ b/testsuite/features/secondary/min_salt_formulas.feature @@ -165,6 +165,7 @@ Feature: Use salt formulas And the keymap on "sle_minion" should be "us" And the language on "sle_minion" should be "en_US.UTF-8" + @skip_if_container_server Scenario: Cleanup: uninstall formula package from the server When I manually uninstall the "locale" formula from the server diff --git a/testsuite/features/secondary/srv_user_configuration_salt_states.feature b/testsuite/features/secondary/srv_user_configuration_salt_states.feature index f01fb5b63deb..fbcc13624c8c 100644 --- a/testsuite/features/secondary/srv_user_configuration_salt_states.feature +++ b/testsuite/features/secondary/srv_user_configuration_salt_states.feature @@ -6,9 +6,12 @@ @scope_salt Feature: Create organizations, users, groups, and activation keys using Salt states +@skip_if_container_server Scenario: Apply configuration salt state to server When I manually install the "uyuni-config" formula on the server - And I apply "setup_users_configuration" local salt state on "server" + + Scenario: Apply setup_users_configuration state to server + When I apply "setup_users_configuration" local salt state on "server" Scenario: Organization my_org was correctly created Given I am authorized as "my_org_user" with password "my_org_user" @@ -66,6 +69,9 @@ Feature: Create organizations, users, groups, and activation keys using Salt sta Scenario: Cleanup: apply configuration teardown salt state to server When I apply "teardown_users_configuration" local salt state on "server" + +@skip_if_container_server + Scenario: Cleanup: uninstall the uyuni-config formula from the server And I manually uninstall the "uyuni-config" formula from the server Scenario: Cleanup: all organizations were successfully removed diff --git a/testsuite/features/step_definitions/salt_steps.rb b/testsuite/features/step_definitions/salt_steps.rb index 205e65fad98a..cb860d331c8b 100644 --- a/testsuite/features/step_definitions/salt_steps.rb +++ b/testsuite/features/step_definitions/salt_steps.rb @@ -198,6 +198,7 @@ end # Salt formulas + When(/^I manually install the "([^"]*)" formula on the server$/) do |package| get_target('server').run('zypper --non-interactive refresh') get_target('server').run("zypper --non-interactive install --force #{package}-formula")