Skip to content

Commit

Permalink
testsuite: do not install or remove formula if in container
Browse files Browse the repository at this point in the history
  • Loading branch information
mbussolotto committed Aug 4, 2023
1 parent c168dbf commit 35d0a2f
Show file tree
Hide file tree
Showing 3 changed files with 5 additions and 0 deletions.
1 change: 1 addition & 0 deletions testsuite/features/secondary/allcli_system_group.feature
Original file line number Diff line number Diff line change
Expand Up @@ -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

Expand Down
1 change: 1 addition & 0 deletions testsuite/features/secondary/min_salt_formulas.feature
Original file line number Diff line number Diff line change
Expand Up @@ -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

Expand Down
3 changes: 3 additions & 0 deletions testsuite/features/step_definitions/salt_steps.rb
Original file line number Diff line number Diff line change
Expand Up @@ -198,11 +198,14 @@
end

# Salt formulas

@skip_if_container_server
When(/^I manually install the "([^"]*)" formula on the server$/) do |package|
$server.run("zypper --non-interactive refresh")
$server.run("zypper --non-interactive install --force #{package}-formula")
end

@skip_if_container_server
When(/^I manually uninstall the "([^"]*)" formula from the server$/) do |package|
$server.run("zypper --non-interactive remove #{package}-formula")
# Remove automatically installed dependency if needed
Expand Down

0 comments on commit 35d0a2f

Please sign in to comment.