@skip_if_github_validation
@sle_minion
@scope_action_chains
Feature: 0063 - Action chains on Salt minions
File name: min_action_chain.feature
Relative path: secondary/min_action_chain.feature
@skip_if_github_validation
@sle_minion
@scope_action_chains
Scenario: Pre-requisite: downgrade repositories to lower version on Salt minion
When
I enable repository "test_repo_rpm_pool" on this "sle_minion"
00:00:00.843
And
I remove package "andromeda-dummy" from this "sle_minion" without error control
00:00:00.969
And
I remove package "virgo-dummy" from this "sle_minion" without error control
00:00:00.988
And
I install package "milkyway-dummy" on this "sle_minion" without error control
00:00:02.234
And
I install old package "andromeda-dummy-1.0" on this "sle_minion"
00:00:02.299
And
I refresh the metadata for "sle_minion"
00:00:01.438
@skip_if_github_validation
@sle_minion
@scope_action_chains
Scenario: Pre-requisite: refresh package list and check installed packages after downgrade on SLE minion
When
I refresh packages list via spacecmd on "sle_minion"
00:00:08.502
And
I wait until refresh package list on "sle_minion" is finished
00:00:14.323
Then
spacecmd should show packages "milkyway-dummy andromeda-dummy-1.0" installed on "sle_minion"
00:00:08.433
@skip_if_github_validation
@sle_minion
@scope_action_chains
Scenario: Pre-requisite: wait until downgrade is finished on SLE minion
Given
I am on the Systems overview page of this "sle_minion"
00:00:01.565
When
I follow "Software" in the content area
00:00:00.077
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.151
And
I click on the filter button until page does contain "andromeda-dummy-1.0" text
00:00:00.287
@skip_if_github_validation
@sle_minion
@scope_action_chains
Scenario: Pre-requisite: ensure the errata cache is computed before testing on Salt minion
When
I follow the left menu "Admin > Task Schedules"
00:00:00.161
And
I follow "errata-cache-default"
00:00:01.220
And
I follow "errata-cache-bunch"
00:00:01.329
And
I click on "Single Run Schedule"
00:00:01.508
Then
I should see a "bunch was scheduled" text
00:00:00.269
And
I wait until the table contains "FINISHED" or "SKIPPED" followed by "FINISHED" in its first rows
00:01:07.500
@skip_if_github_validation
@sle_minion
@scope_action_chains
Scenario: Create a custom action chain for the Salt minion
When
I create an action chain with label "salt_minion_action_chain" via API
00:00:01.037
And
I follow the left menu "Schedule > Action Chains"
00:00:00.146
Then
I should see a "salt_minion_action_chain" text
00:00:00.094
@skip_if_github_validation
@sle_minion
@scope_action_chains
Scenario: Add a patch installation to the action chain on Salt minion
Given
I am on the Systems overview page of this "sle_minion"
00:00:01.613
When
I follow "Software" in the content area
00:00:00.076
And
I follow "Patches" in the content area
00:00:00.066
And
I enter "andromeda" as the filtered synopsis
00:00:00.051
And
I click on the filter button
00:00:10.115
And
I check "andromeda-dummy-6789" in the list
00:00:00.059
And
I click on "Apply Patches"
00:00:00.622
And
I check radio button "schedule-by-action-chain"
00:00:10.066
And
I click on "Confirm"
00:00:01.173
Then
I should see a "Action has been successfully added to the Action Chain" text
00:00:00.074
@skip_if_github_validation
@sle_minion
@scope_action_chains
Scenario: Add a package removal to the action chain on Salt minion
Given
I am on the Systems overview page of this "sle_minion"
00:00:01.762
When
I follow "Software" in the content area
00:00:00.078
And
I follow "List / Remove" in the content area
00:00:00.070
And
I enter "milkyway-dummy" as the filtered package name
00:00:00.174
And
I click on the filter button
00:00:00.827
And
I check row with "milkyway-dummy" and arch of "sle_minion"
00:00:00.060
And
I click on "Remove Packages"
00:00:00.599
And
I check radio button "schedule-by-action-chain"
00:00:10.058
And
I click on "Confirm"
00:00:00.588
Then
I should see a "Action has been successfully added to the Action Chain" text
00:00:00.067
@skip_if_github_validation
@sle_minion
@scope_action_chains
Scenario: Add a package installation to an action chain on Salt minion
When
I follow "Software" in the content area
00:00:00.067
And
I follow "Install New Packages" in the content area
00:00:00.063
And
I enter "virgo-dummy" as the filtered package name
00:00:00.149
And
I click on the filter button
00:00:00.703
And
I check "virgo-dummy" in the list
00:00:00.055
And
I click on "Install Packages"
00:00:00.521
And
I check radio button "schedule-by-action-chain"
00:00:10.054
And
I click on "Confirm"
00:00:00.674
Then
I should see a "Action has been successfully added to the Action Chain" text
00:00:00.063
@skip_if_github_validation
@sle_minion
@scope_action_chains
Scenario: Create a configuration channel for testing action chain on Salt minion
When
I follow the left menu "Configuration > Channels"
00:00:00.126
And
I follow "Create Config Channel"
00:00:00.270
And
I enter "Action Chain Channel" as "cofName"
00:00:00.069
And
I enter "actionchainchannel" as "cofLabel"
00:00:00.063
And
I enter "This is a test channel" as "cofDescription"
00:00:00.067
And
I click on "Create Config Channel"
00:00:00.646
Then
I should see a "Action Chain Channel" text
00:00:00.063
@skip_if_github_validation
@sle_minion
@scope_action_chains
Scenario: Add a configuration file to configuration channel for testing action chain on Salt minion
When
I follow the left menu "Configuration > Channels"
00:00:00.065
And
I follow "Action Chain Channel"
00:00:00.451
And
I follow "Create Configuration File or Directory"
00:00:00.321
And
I enter "/etc/action-chain.cnf" as "cffPath"
00:00:00.070
And
I enter "Testchain=YES_PLEASE" in the editor
00:00:00.004
And
I click on "Create Configuration File"
00:00:00.569
Then
I should see a "Revision 1 of /etc/action-chain.cnf from channel Action Chain Channel" text
00:00:00.095
And
I should see a "Update Configuration File" button
00:00:00.017
@skip_if_github_validation
@sle_minion
@scope_action_chains
Scenario: Download the configuration file from configuration channel
When
I follow the left menu "Configuration > Channels"
00:00:00.059
And
I follow "Action Chain Channel"
00:00:00.363
And
I follow "List/Remove Files"
00:00:00.374
And
I follow "/etc/action-chain.cnf"
00:00:00.449
And
I follow "Download File"
00:00:00.154
And
I wait until file "/tmp/downloads/action-chain.cnf" exists on "localhost"
00:00:00.185
Then
file "/tmp/downloads/action-chain.cnf" should contain "Testchain=YES_PLEASE" on "localhost"
00:00:00.318
@skip_if_github_validation
@sle_minion
@scope_action_chains
Scenario: Subscribe system to configuration channel for testing action chain on Salt minion
Given
I am on the Systems overview page of this "sle_minion"
00:00:01.491
When
I follow "Configuration" in the content area
00:00:00.071
And
I follow "Manage Configuration Channels" in the content area
00:00:00.075
And
I follow first "Subscribe to Channels" in the content area
00:00:00.069
And
I check "Action Chain Channel" in the list
00:00:00.055
And
I click on "Continue"
00:00:00.058
And
I click on "Update Channel Rankings"
00:00:00.864
Then
I should see a "Channel Subscriptions successfully changed for" text
00:00:00.077
@skip_if_github_validation
@sle_minion
@scope_action_chains
Scenario: Add a configuration file deployment to the action chain on Salt minion
When
I follow the left menu "Configuration > Channels"
00:00:00.111
And
I follow "Action Chain Channel"
00:00:00.447
And
I follow "Deploy Files" in the content area
00:00:00.064
And
I click on "Deploy All Files"
00:00:00.057
And
I check the "sle_minion" client
00:00:00.580
And
I click on "Confirm & Deploy to Selected Systems"
00:00:00.633
And
I check radio button "schedule-by-action-chain"
00:00:10.073
And
I click on "Deploy Files to Selected Systems"
00:00:00.701
Then
I should see a "Action has been successfully added to the Action Chain" text
00:00:00.069
@skip_if_github_validation
@sle_minion
@scope_action_chains
Scenario: Add apply highstate to action chain on Salt minion
Given
I am on the Systems overview page of this "sle_minion"
00:00:01.641
When
I follow "States" in the content area
00:00:00.070
And
I check radio button "schedule-by-action-chain"
00:00:10.074
And
I click on "Apply Highstate"
00:00:00.059
@skip_if_github_validation
@sle_minion
@scope_action_chains
Scenario: Add a reboot action to the action chain on Salt minion
Given
I am on the Systems overview page of this "sle_minion"
00:00:01.675
When
I follow first "Schedule System Reboot"
00:00:00.479
And
I check radio button "schedule-by-action-chain"
00:00:10.056
And
I click on "Reboot system"
00:00:01.075
Then
I should see a "Action has been successfully added to the Action Chain" text
00:00:00.088
@skip_if_github_validation
@sle_minion
@scope_action_chains
Scenario: Add a remote command to the action chain on Salt minion
When
I follow "Details" in the content area
00:00:00.074
And
I follow "Remote Command" in the content area
00:00:00.089
And
I enter as remote command this script in
00:00:00.067
#!/bin/bash touch /tmp/action_chain_one_system_done
And
I check radio button "schedule-by-action-chain"
00:00:10.081
And
I click on "Schedule"
00:00:00.568
Then
I should see a "Action has been successfully added to the Action Chain" text
00:00:00.078
@skip_if_github_validation
@sle_minion
@scope_action_chains
Scenario: Verify the action chain list on Salt minion
When
I follow "Schedule"
00:00:00.668
And
I follow "Action Chains"
00:00:00.352
And
I follow "salt_minion_action_chain"
00:00:00.709
Then
I should see a "1. Apply patch(es) andromeda-dummy-6789 on 1 system" text
00:00:00.092
And
I should see a "2. Remove milkyway-dummy from 1 system" text
00:00:00.085
And
I should see a "3. Install or update virgo-dummy on 1 system" text
00:00:00.079
And
I should see a text like "4. Deploy.*/etc/action-chain.cnf.*to 1 system"
00:00:00.080
And
I should see a "5. Apply Highstate" text
00:00:00.080
And
I should see a "6. Reboot 1 system" text
00:00:00.079
And
I should see a "7. Run a remote command on 1 system" text
00:00:00.082
@skip_if_github_validation
@sle_minion
@scope_action_chains
Scenario: Check that a different user cannot see the action chain for Salt minion
Given
I am authorized as "testing" with password "testing"
00:00:02.109
When
I follow "Schedule"
00:00:00.998
And
I follow "Action Chains"
00:00:00.251
Then
I should not see a "salt_minion_action_chain" link
00:00:00.008
@skip_if_github_validation
@sle_minion
@scope_action_chains
Scenario: Execute the action chain from the web UI on Salt minion
Given
I am authorized for the "Admin" section
00:00:02.059
When
I am on the Systems overview page of this "sle_minion"
00:00:01.922
And
I follow "Schedule"
00:00:00.258
And
I follow "Action Chains"
00:00:00.257
And
I follow "salt_minion_action_chain"
00:00:00.248
And
I click on "Save and Schedule"
00:00:00.059
Then
I should see a "Action Chain salt_minion_action_chain has been scheduled for execution." text
00:00:00.784
When
I wait for "virgo-dummy" to be installed on "sle_minion"
00:00:32.461
And
I wait at most 300 seconds until file "/tmp/action_chain_one_system_done" exists on "sle_minion"
00:04:05.083
@skip_if_github_validation
@sle_minion
@scope_action_chains
Scenario: Create a custom action chain for the Salt minion
When
I create an action chain with label "salt_minion_action_chain_to_delete" via API
00:00:00.964
And
I follow the left menu "Schedule > Action Chains"
00:00:00.072
Then
I should see a "salt_minion_action_chain_to_delete" text
00:00:00.072
@skip_if_github_validation
@sle_minion
@scope_action_chains
Scenario: Add a remote command to the action chain on Salt minion
Given
I am on the Systems overview page of this "sle_minion"
00:00:01.529
When
I follow "Remote Command"
00:00:00.412
And
I enter as remote command this script in
00:00:00.056
#!/bin/bash uptime
And
I check radio button "schedule-by-action-chain"
00:00:10.100
And
I click on "Schedule"
00:00:00.057
Then
I should see a "Action has been successfully added to the Action Chain" text
00:00:00.088
@skip_if_github_validation
@sle_minion
@scope_action_chains
Scenario: Delete the action chain for Salt minion
When
I follow "Schedule"
00:00:00.254
And
I follow "Action Chains"
00:00:00.267
And
I follow "salt_minion_action_chain_to_delete"
00:00:00.231
And
I follow "Delete Action Chains" in the content area
00:00:00.079
And
I click on "Delete"
00:00:00.394
@skip_if_github_validation
@sle_minion
@scope_action_chains
Scenario: Downgrade again repositories to lower version on Salt minion
When
I remove package "andromeda-dummy" from this "sle_minion" without error control
00:00:02.993
And
I remove package "virgo-dummy" from this "sle_minion" without error control
00:00:01.923
And
I install package "milkyway-dummy" on this "sle_minion" without error control
00:00:02.227
And
I install old package "andromeda-dummy-1.0" on this "sle_minion"
00:00:02.370
@skip_if_github_validation
@sle_minion
@scope_action_chains
Scenario: Refresh package list and check installed packages after second downgrade on SLE minion
When
I refresh packages list via spacecmd on "sle_minion"
00:00:08.275
And
I wait until refresh package list on "sle_minion" is finished
00:00:13.190
Then
spacecmd should show packages "milkyway-dummy andromeda-dummy-1.0" installed on "sle_minion"
00:00:07.489
@skip_if_github_validation
@sle_minion
@scope_action_chains
Scenario: Ensure again the errata cache is computed before testing on Salt minion
When
I follow the left menu "Admin > Task Schedules"
00:00:00.131
And
I follow "errata-cache-default"
00:00:01.361
And
I follow "errata-cache-bunch"
00:00:01.529
And
I click on "Single Run Schedule"
00:00:01.258
Then
I should see a "bunch was scheduled" text
00:00:00.277
And
I wait until the table contains "FINISHED" or "SKIPPED" followed by "FINISHED" in its first rows
00:00:11.984
@skip_if_github_validation
@sle_minion
@scope_action_chains
Scenario: Add operations to the action chain via API for Salt minions
Given
I want to operate on this "sle_minion"
00:00:02.663
When
I create an action chain with label "salt_minion_api_chain" via API
00:00:00.938
And
I add a package install to the action chain via API
00:00:01.986
And
I add a package removal to the action chain via API
00:00:01.944
And
I add a package upgrade to the action chain via API
00:00:02.018
And
I add the script "exit 1;" to the action chain via API
00:00:00.958
And
I add a system reboot to the action chain via API
00:00:00.949
Running actions: - System reboot - Package Install/Upgrade - Package Install/Upgrade - Run an arbitrary script - Package Removal
- Removed "System reboot" action - Removed "Package Install/Upgrade" action - Removed "Package Install/Upgrade" action - Removed "Run an arbitrary script" action - Removed "Package Removal" action
Then
the current action chain should be empty
00:00:00.931
And
I delete the action chain via API
00:00:00.931
@skip_if_github_validation
@sle_minion
@scope_action_chains
Scenario: Run an action chain via API on Salt minion
Given
I want to operate on this "sle_minion"
00:00:00.926
When
I create an action chain with label "salt_minion_multiple_scripts" via API
00:00:00.944
And
I add the script "echo -n 1 >> /tmp/action_chain.log" to the action chain via API
00:00:00.943
And
I add the script "echo -n 2 >> /tmp/action_chain.log" to the action chain via API
00:00:00.952
And
I add the script "echo -n 3 >> /tmp/action_chain.log" to the action chain via API
00:00:00.949
And
I add the script "touch /tmp/action_chain_done" to the action chain via API
00:00:01.026
Running actions: - Run an arbitrary script - Run an arbitrary script - Run an arbitrary script - Run an arbitrary script
When
I schedule the action chain via API
00:00:01.078
And
I wait until there are no more action chains listed via API
00:00:01.238
And
I wait until file "/tmp/action_chain_done" exists on "sle_minion"
00:00:04.067
Then
file "/tmp/action_chain.log" should contain "123" on "sle_minion"
00:00:00.911
When
I wait until there are no more scheduled actions listed via API
00:00:00.932
@skip_if_github_validation
@sle_minion
@scope_action_chains
Scenario: Cleanup: remove Salt minion from configuration channel
When
I follow the left menu "Configuration > Channels"
00:00:00.161
And
I follow "Action Chain Channel"
00:00:00.438
And
I follow "Systems" in the content area
00:00:00.080
And
I check the "sle_minion" client
00:00:00.077
And
I click on "Unsubscribe systems"
00:00:00.055
Then
I should see a "Successfully unsubscribed 1 system(s)." text
00:00:00.064
@skip_if_github_validation
@sle_minion
@scope_action_chains
Scenario: Cleanup: remove configuration channel for Salt minion
When
I follow the left menu "Configuration > Channels"
00:00:00.062
And
I follow "Action Chain Channel"
00:00:00.422
And
I follow "Delete Channel"
00:00:00.295
And
I click on "Delete Config Channel"
00:00:00.061
@skip_if_github_validation
@sle_minion
@scope_action_chains
Scenario: Cleanup: remove packages and repository used in action chain for Salt minion
When
I remove package "andromeda-dummy" from this "sle_minion" without error control
00:00:02.157
And
I remove package "virgo-dummy" from this "sle_minion" without error control
00:00:00.945
And
I remove package "milkyway-dummy" from this "sle_minion" without error control
00:00:01.881
And
I disable repository "test_repo_rpm_pool" on this "sle_minion" without error control
00:00:00.503
@skip_if_github_validation
@sle_minion
@scope_action_chains
Scenario: Cleanup: remove temporary files for testing action chains on Salt minion
When
I run "rm -f /tmp/action_chain.log" on "sle_minion" without error control
00:00:00.433
And
I run "rm -f /tmp/action_chain_done" on "sle_minion" without error control
00:00:00.472
And
I run "rm -f /etc/action-chain.cnf" on "sle_minion" without error control
00:00:00.453
And
I run "rm -f /tmp/action_chain_one_system_done" on "sle_minion" without error control
00:00:00.449