@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.804
And
I refresh the metadata for "sle_minion"
00:00:00.874
And
I install old package "milkyway-dummy-1.0" on this "sle_minion" without error control
00:00:02.001
And
I install old package "virgo-dummy-1.0" on this "sle_minion" without error control
00:00:01.820
And
I install old package "andromeda-dummy-1.0" on this "sle_minion" without error control
00:00:01.830
@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.915
And
I wait until refresh package list on "sle_minion" is finished
00:00:13.472
Then
spacecmd should show packages "milkyway-dummy-1.0 virgo-dummy-1.0 andromeda-dummy-1.0" installed on "sle_minion"
00:00:07.661
@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:02.444
When
I follow "Software" in the content area
00:00:00.076
And
I follow "List / Remove" in the content area
00:00:00.067
And
I enter "andromeda-dummy" as the filtered package name
00:00:00.231
And
I click on the filter button until page does contain "andromeda-dummy-1.0" text
00:00:00.286
When
I follow the left menu "Admin > Task Schedules"
00:00:00.159
And
I follow "errata-cache-default"
00:00:01.243
And
I follow "errata-cache-bunch"
00:00:01.301
Then
I click on "Single Run Schedule"
00:00:01.568
And
I should see a "bunch was scheduled" text
00:00:00.273
Then
I wait until the table contains "FINISHED" or "SKIPPED" followed by "FINISHED" in its first rows
00:00:28.428
@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.596
When
I follow "Software" in the content area
00:00:00.076
And
I follow "Software Channels" in the content area
00:00:00.068
Then
the system should have a base channel set
00:00:00.073
@skip_if_github_validation
@scope_salt
Scenario: Remove a package through the UI
When
I follow "States" in the content area
00:00:00.069
And
I follow "Packages"
00:00:00.515
And
I follow "Search"
00:00:00.065
And
I should see a "Package States" text
00:00:00.072
And
I list packages with "dummy"
00:00:01.154
And
I wait until I see "milkyway-dummy" text
00:00:00.456
Then
"milkyway-dummy" should be installed on "sle_minion"
00:00:00.734
And
I change the state of "milkyway-dummy" to "Removed" and ""
00:00:00.060
Then
I should see a "1 Change" text
00:00:00.090
And
I click save
00:00:00.053
Then
I wait until I see "Package states have been saved." text
00:00:00.336
And
I click apply
00:00:00.048
And
I wait for "milkyway-dummy" to be uninstalled on "sle_minion"
00:00:08.610
@skip_if_github_validation
@scope_salt
Scenario: Install a package through the UI
When
I follow "States" in the content area
00:00:00.065
And
I follow "Packages"
00:00:00.491
And
I follow "Search"
00:00:00.056
And
I should see a "Package States" text
00:00:00.071
And
I list packages with "dummy"
00:00:01.132
And
I wait until I see "milkyway-dummy" text
00:00:00.482
Then
"milkyway-dummy" should not be installed on "sle_minion"
00:00:00.480
And
I change the state of "milkyway-dummy" to "Installed" and ""
00:00:00.045
Then
I should see a "1 Change" text
00:00:00.096
And
I click save
00:00:00.044
Then
I wait until I see "Package states have been saved." text
00:00:00.225
And
I click apply
00:00:00.040
And
I wait for "milkyway-dummy" to be installed on "sle_minion"
00:00:11.507
@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.066
And
I follow "Packages"
00:00:00.577
And
I follow "Search"
00:00:00.058
And
I should see a "Package States" text
00:00:00.074
And
I list packages with "dummy"
00:00:01.134
And
I wait until I see "virgo-dummy" text
00:00:00.503
Then
"virgo-dummy-1.0" should be installed on "sle_minion"
00:00:00.728
And
I change the state of "virgo-dummy" to "Installed" and "Any"
00:00:00.113
Then
I should see a "1 Change" text
00:00:00.102
And
I click save
00:00:00.053
Then
I wait until I see "Package states have been saved." text
00:00:00.366
And
I click apply
00:00:00.048
And
I wait for "virgo-dummy-1.0" to be installed on "sle_minion"
00:00:01.298
@skip_if_github_validation
@scope_salt
Scenario: Upgrade a package through the UI
When
I follow "States" in the content area
00:00:00.079
And
I follow "Packages"
00:00:00.639
And
I follow "Search"
00:00:00.067
And
I should see a "Package States" text
00:00:00.070
And
I list packages with "dummy"
00:00:01.151
And
I wait until I see "andromeda-dummy" text
00:00:00.509
Then
"andromeda-dummy-1.0" should be installed on "sle_minion"
00:00:00.510
And
I change the state of "andromeda-dummy" to "Installed" and "Latest"
00:00:00.092
Then
I should see a "1 Change" text
00:00:00.106
And
I click save
00:00:00.052
Then
I wait until I see "Package states have been saved." text
00:00:00.232
And
I click apply
00:00:00.049
And
I wait for "andromeda-dummy-2.0-1.1" to be installed on "sle_minion"
00:00:11.330
When
I follow "States" in the content area
00:00:00.079
And
I follow "Packages"
00:00:00.572
And
I should see a "Package States" text
00:00:00.068
And
I should see a "milkyway-dummy" text
00:00:00.193
And
I should see a "andromeda-dummy" text
00:00:00.076
And
I should see a "virgo-dummy" text
00:00:00.075
@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.060
And
I follow "Highstate" in the content area
00:00:00.074
And
I click on "Show full highstate output"
00:00:00.258
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:01.062
@skip_if_github_validation
@scope_salt
@skip_if_github_validation
Scenario: Use Salt presence mechanism on an unreachable minion
When
I follow "States" in the content area
00:00:00.071
And
I run "pkill salt-minion" on "sle_minion" without error control
00:00:00.859
And
I run "pkill python.original" on "sle_minion" without error control
00:00:00.428
And
I follow "Highstate" in the content area
00:00:00.062
And
I click on "Show full highstate output"
00:00:00.229
And
I wait until I see "No reply from minion" text
00:00:15.096
@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.649
When
I follow "States" in the content area
00:00:00.083
And
I follow "Packages"
00:00:00.823
And
I follow "Search"
00:00:00.067
And
I should see a "Package States" text
00:00:00.069
And
I list packages with "dummy"
00:00:01.152
And
I wait until I see "andromeda-dummy" text
00:00:00.487
And
I change the state of "virgo-dummy" to "Unmanaged" and ""
00:00:00.067
And
I change the state of "andromeda-dummy" to "Unmanaged" and ""
00:00:00.051
And
I click save
00:00:00.051
Then
I wait until I see "Package states have been saved." text
00:00:00.488
@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.464
And
I remove package "milkyway-dummy" from this "sle_minion" without error control
00:00:01.633
And
I remove package "virgo-dummy" from this "sle_minion" without error control
00:00:01.679
And
I remove package "andromeda-dummy" from this "sle_minion" without error control
00:00:01.624
And
I refresh the metadata for "sle_minion"
00:00:00.921