@skip_if_github_validation
@scope_salt
Feature: 0058 - Salt package states
File name: min_salt_software_states.feature
Relative path: secondary/min_salt_software_states.feature
@skip_if_github_validation
@scope_salt
Scenario: Pre-requisite: install old packages on SLES minion
Salt command: salt uyuni-master-suse-minion.sumaci.aws state.highstate
And
I enable repository "test_repo_rpm_pool" on this "sle_minion"
00:00:00.950
And
I refresh the metadata for "sle_minion"
00:00:01.038
And
I install old package "milkyway-dummy-1.0" on this "sle_minion" without error control
00:00:02.440
And
I install old package "virgo-dummy-1.0" on this "sle_minion" without error control
00:00:02.521
And
I install old package "andromeda-dummy-1.0" on this "sle_minion" without error control
00:00:03.064
@skip_if_github_validation
@scope_salt
Scenario: Pre-requisite: refresh package list and check installed packages on SLE minion
When
I refresh packages list via spacecmd on "sle_minion"
00:00:08.063
And
I wait until refresh package list on "sle_minion" is finished
00:00:13.239
Then
spacecmd should show packages "milkyway-dummy-1.0 virgo-dummy-1.0 andromeda-dummy-1.0" installed on "sle_minion"
00:00:07.433
@skip_if_github_validation
@scope_salt
Scenario: Pre-requisite: ensure the errata cache is computed before software states tests
Given
I am on the Systems overview page of this "sle_minion"
00:00:01.935
When
I follow "Software" in the content area
00:00:00.075
And
I follow "List / Remove" in the content area
00:00:00.077
And
I enter "andromeda-dummy" as the filtered package name
00:00:00.220
And
I click on the filter button until page does contain "andromeda-dummy-1.0" text
00:00:00.277
When
I follow the left menu "Admin > Task Schedules"
00:00:00.147
And
I follow "errata-cache-default"
00:00:01.205
And
I follow "errata-cache-bunch"
00:00:00.381
Then
I click on "Single Run Schedule"
00:00:01.251
And
I should see a "bunch was scheduled" text
00:00:00.265
Then
I wait until the table contains "FINISHED" or "SKIPPED" followed by "FINISHED" in its first rows
00:00:28.719
@skip_if_github_validation
@scope_salt
Scenario: Accepted minion has a base channel
Given
I am on the Systems overview page of this "sle_minion"
00:00:01.535
When
I follow "Software" in the content area
00:00:00.059
And
I follow "Software Channels" in the content area
00:00:00.063
Then
the system should have a base channel set
00:00:00.068
@skip_if_github_validation
@scope_salt
Scenario: Remove a package through the UI
When
I follow "States" in the content area
00:00:00.063
And
I follow "Packages"
00:00:00.468
And
I follow "Search"
00:00:00.062
And
I should see a "Package States" text
00:00:00.067
And
I list packages with "dummy"
00:00:01.122
And
I wait until I see "milkyway-dummy" text
00:00:00.171
Then
"milkyway-dummy" should be installed on "sle_minion"
00:00:00.900
And
I change the state of "milkyway-dummy" to "Removed" and ""
00:00:00.058
Then
I should see a "1 Change" text
00:00:00.084
And
I click save
00:00:00.048
Then
I wait until I see "Package states have been saved." text
00:00:00.315
And
I click apply
00:00:00.047
And
I wait for "milkyway-dummy" to be uninstalled on "sle_minion"
00:00:09.047
@skip_if_github_validation
@scope_salt
Scenario: Install a package through the UI
When
I follow "States" in the content area
00:00:00.061
And
I follow "Packages"
00:00:00.463
And
I follow "Search"
00:00:00.050
And
I should see a "Package States" text
00:00:00.066
And
I list packages with "dummy"
00:00:01.112
And
I wait until I see "milkyway-dummy" text
00:00:00.181
Then
"milkyway-dummy" should not be installed on "sle_minion"
00:00:00.864
And
I change the state of "milkyway-dummy" to "Installed" and ""
00:00:00.043
Then
I should see a "1 Change" text
00:00:00.091
And
I click save
00:00:00.042
Then
I wait until I see "Package states have been saved." text
00:00:00.219
And
I click apply
00:00:00.038
And
I wait for "milkyway-dummy" to be installed on "sle_minion"
00:00:17.179
@skip_if_github_validation
@scope_salt
Scenario: Install an already installed package through the UI
When
I follow "States" in the content area
00:00:00.061
And
I follow "Packages"
00:00:00.470
And
I follow "Search"
00:00:00.054
And
I should see a "Package States" text
00:00:00.068
And
I list packages with "dummy"
00:00:01.115
And
I wait until I see "virgo-dummy" text
00:00:00.186
Then
"virgo-dummy-1.0" should be installed on "sle_minion"
00:00:00.576
And
I change the state of "virgo-dummy" to "Installed" and "Any"
00:00:00.104
Then
I should see a "1 Change" text
00:00:00.092
And
I click save
00:00:00.050
Then
I wait until I see "Package states have been saved." text
00:00:00.353
And
I click apply
00:00:00.045
And
I wait for "virgo-dummy-1.0" to be installed on "sle_minion"
00:00:01.531
@skip_if_github_validation
@scope_salt
Scenario: Upgrade a package through the UI
When
I follow "States" in the content area
00:00:00.061
And
I follow "Packages"
00:00:00.520
And
I follow "Search"
00:00:00.054
And
I should see a "Package States" text
00:00:00.070
And
I list packages with "dummy"
00:00:01.123
And
I wait until I see "andromeda-dummy" text
00:00:00.186
Then
"andromeda-dummy-1.0" should be installed on "sle_minion"
00:00:00.578
And
I change the state of "andromeda-dummy" to "Installed" and "Latest"
00:00:00.072
Then
I should see a "1 Change" text
00:00:00.091
And
I click save
00:00:00.043
Then
I wait until I see "Package states have been saved." text
00:00:00.351
And
I click apply
00:00:00.039
And
I wait for "andromeda-dummy-2.0-1.1" to be installed on "sle_minion"
00:00:19.776
When
I follow "States" in the content area
00:00:00.061
And
I follow "Packages"
00:00:00.474
And
I should see a "Package States" text
00:00:00.064
And
I should see a "milkyway-dummy" text
00:00:00.176
And
I should see a "andromeda-dummy" text
00:00:00.073
And
I should see a "virgo-dummy" text
00:00:00.073
@skip_if_github_validation
@scope_salt
Scenario: Use Salt presence mechanism on an active minion
When
I follow "States" in the content area
00:00:00.056
And
I follow "Highstate" in the content area
00:00:00.066
And
I click on "Show full highstate output"
00:00:00.144
And
I wait for "6" seconds
00:00:06.000
And
I should see a "pkg_removed" or "running as PID" text in element "highstate"
00:00:10.011
+ Show Error
Texts pkg_removed and running as PID not found in highstate (ScriptError) ./features/step_definitions/navigation_steps.rb:788:in `block (2 levels) in (top (required))' ./features/step_definitions/navigation_steps.rb:787:in `/^I should see a "([^"]*)" or "([^"]*)" text in element "([^"]*)"$/' features/secondary/min_salt_software_states.feature:116:in `I should see a "pkg_removed" or "running as PID" text in element "highstate"'
@skip_if_github_validation
@scope_salt
@skip_if_github_validation
Scenario: Use Salt presence mechanism on an unreachable minion
Unable to find link "States" within #(Capybara::Node::Element tag="section" path="/HTML/BODY[1]/DIV[3]/DIV[1]/DIV[1]/SECTION[1]") (Capybara::ElementNotFound) ./features/support/commonlib.rb:193:in `click_link_and_wait' ./features/step_definitions/navigation_steps.rb:366:in `/^I follow "([^"]*)"$/' ./features/step_definitions/navigation_steps.rb:388:in `block (2 levels) in (top (required))' ./features/step_definitions/navigation_steps.rb:387:in `/^I follow "([^"]*)" in the (.+)$/' features/secondary/min_salt_software_states.feature:122:in `I follow "States" in the content area'
And
I run "pkill salt-minion" on "sle_minion" without error control
0s
And
I run "pkill python.original" on "sle_minion" without error control
0s
And
I follow "Highstate" in the content area
0s
And
I click on "Show full highstate output"
0s
And
I wait until I see "No reply from minion" text
0s
@skip_if_github_validation
@scope_salt
Scenario: Cleanup: set the package states as unmanaged
Given
I am on the Systems overview page of this "sle_minion"
00:00:01.538
When
I follow "States" in the content area
00:00:00.065
And
I follow "Packages"
00:00:00.546
And
I follow "Search"
00:00:00.062
And
I should see a "Package States" text
00:00:00.070
And
I list packages with "dummy"
00:00:01.126
And
I wait until I see "andromeda-dummy" text
00:00:00.187
And
I change the state of "virgo-dummy" to "Unmanaged" and ""
00:00:00.060
And
I change the state of "andromeda-dummy" to "Unmanaged" and ""
00:00:00.044
And
I click save
00:00:00.050
Then
I wait until I see "Package states have been saved." text
00:00:00.225
@skip_if_github_validation
@scope_salt
Scenario: Cleanup: remove old packages from SLES minion
When
I disable repository "test_repo_rpm_pool" on this "sle_minion"
00:00:00.587
And
I remove package "milkyway-dummy" from this "sle_minion" without error control
00:00:02.128
And
I remove package "virgo-dummy" from this "sle_minion" without error control
00:00:02.040
And
I remove package "andromeda-dummy" from this "sle_minion" without error control
00:00:02.064
And
I refresh the metadata for "sle_minion"
00:00:01.097