@skip_if_github_validation
@ssh_minion
@scope_action_chains
@scope_salt_ssh
Feature: 0064 - Salt SSH action chain
File name: minssh_action_chain.feature
Relative path: secondary/minssh_action_chain.feature
@skip_if_github_validation
@ssh_minion
@scope_action_chains
@scope_salt_ssh
Scenario: Pre-requisite: downgrade repositories to lower version on SSH minion
When
I enable repository "test_repo_rpm_pool" on this "ssh_minion"
00:00:00.751
And
I remove package "andromeda-dummy" from this "ssh_minion" without error control
00:00:01.362
And
I remove package "virgo-dummy" from this "ssh_minion" without error control
00:00:01.334
And
I install package "milkyway-dummy" on this "ssh_minion" without error control
00:00:01.795
And
I install old package "andromeda-dummy-1.0" on this "ssh_minion"
00:00:01.402
And
I refresh the metadata for "ssh_minion"
00:00:00.830
@skip_if_github_validation
@ssh_minion
@scope_action_chains
@scope_salt_ssh
Scenario: Pre-requisite: refresh package list and check newly installed packages on SSH minion
When
I refresh packages list via spacecmd on "ssh_minion"
00:00:08.583
And
I wait until refresh package list on "ssh_minion" is finished
00:00:24.287
Then
spacecmd should show packages "milkyway-dummy andromeda-dummy-1.0" installed on "ssh_minion"
00:00:07.982
@skip_if_github_validation
@ssh_minion
@scope_action_chains
@scope_salt_ssh
Scenario: Pre-requisite: wait until downgrade is finished on SSH minion
Given
I am on the Systems overview page of this "ssh_minion"
00:00:01.645
When
I follow "Software" in the content area
00:00:00.071
And
I follow "List / Remove" in the content area
00:00:00.066
And
I enter "andromeda-dummy" as the filtered package name
00:00:00.174
And
I click on the filter button until page does contain "andromeda-dummy-1.0" text
00:00:00.609
@skip_if_github_validation
@ssh_minion
@scope_action_chains
@scope_salt_ssh
Scenario: Pre-requisite: ensure the errata cache is computed before testing on SSH minion
When
I follow the left menu "Admin > Task Schedules"
00:00:00.152
And
I follow "errata-cache-default"
00:00:01.248
And
I follow "errata-cache-bunch"
00:00:01.234
And
I click on "Single Run Schedule"
00:00:01.316
Then
I should see a "bunch was scheduled" text
00:00:00.583
And
I wait until the table contains "FINISHED" or "SKIPPED" followed by "FINISHED" in its first rows
00:00:00.898
@skip_if_github_validation
@ssh_minion
@scope_action_chains
@scope_salt_ssh
Scenario: Create a custom action chain for the SSH minion
When
I create an action chain with label "minssh_action_chain" via API
00:00:00.959
And
I follow the left menu "Schedule > Action Chains"
00:00:00.144
Then
I wait until I see "minssh_action_chain" text
00:00:00.149
@skip_if_github_validation
@ssh_minion
@scope_action_chains
@scope_salt_ssh
Scenario: Add a patch installation to the action chain on SSH minion
Given
I am on the Systems overview page of this "ssh_minion"
00:00:01.532
When
I follow "Software" in the content area
00:00:00.069
And
I follow "Patches" in the content area
00:00:00.065
And
I enter "andromeda" as the filtered synopsis
00:00:00.044
And
I click on the filter button
00:00:10.098
And
I check "andromeda-dummy-6789" in the list
00:00:00.059
And
I click on "Apply Patches"
00:00:00.619
And
I check radio button "schedule-by-action-chain"
00:00:10.076
And
I click on "Confirm"
00:00:00.774
Then
I should see a "Action has been successfully added to the Action Chain" text
00:00:00.181
@skip_if_github_validation
@ssh_minion
@scope_action_chains
@scope_salt_ssh
Scenario: Add a package removal to the action chain on SSH minion
When
I follow "Software" in the content area
00:00:00.069
And
I follow "List / Remove" in the content area
00:00:00.065
And
I enter "milkyway-dummy" as the filtered package name
00:00:00.214
And
I click on the filter button
00:00:00.849
And
I check row with "milkyway-dummy" and arch of "ssh_minion"
00:00:00.059
And
I click on "Remove Packages"
00:00:00.588
And
I check radio button "schedule-by-action-chain"
00:00:10.057
And
I click on "Confirm"
00:00:00.606
Then
I should see a "Action has been successfully added to the Action Chain" text
00:00:00.154
@skip_if_github_validation
@ssh_minion
@scope_action_chains
@scope_salt_ssh
Scenario: Add a package installation to an action chain on SSH minion
When
I follow "Software" in the content area
00:00:00.068
And
I follow "Install New Packages" in the content area
00:00:00.062
And
I enter "virgo-dummy" as the filtered package name
00:00:00.044
And
I click on the filter button
00:00:00.502
And
I check "virgo-dummy" in the list
00:00:00.053
And
I click on "Install Packages"
00:00:00.613
And
I check radio button "schedule-by-action-chain"
00:00:10.052
And
I click on "Confirm"
00:00:00.579
Then
I should see a "Action has been successfully added to the Action Chain" text
00:00:00.159
@skip_if_github_validation
@ssh_minion
@scope_action_chains
@scope_salt_ssh
Scenario: Create a configuration channel for testing action chain on SSH minion
When
I follow the left menu "Configuration > Channels"
00:00:00.127
And
I follow "Create Config Channel"
00:00:00.264
And
I enter "Action Chain Channel" as "cofName"
00:00:00.089
And
I enter "actionchainchannel" as "cofLabel"
00:00:00.062
And
I enter "This is a test channel" as "cofDescription"
00:00:00.064
And
I click on "Create Config Channel"
00:00:00.062
Then
I should see a "Action Chain Channel" text
00:00:00.157
@skip_if_github_validation
@ssh_minion
@scope_action_chains
@scope_salt_ssh
Scenario: Add a configuration file to configuration channel for testing action chain on SSH minion
When
I follow the left menu "Configuration > Channels"
00:00:00.064
And
I follow "Action Chain Channel"
00:00:00.354
And
I follow "Create Configuration File or Directory"
00:00:00.342
And
I enter "/etc/action-chain.cnf" as "cffPath"
00:00:00.069
And
I enter "Testchain=YES_PLEASE" in the editor
00:00:00.004
And
I click on "Create Configuration File"
00:00:00.064
Then
I should see a "Revision 1 of /etc/action-chain.cnf from channel Action Chain Channel" text
00:00:00.753
And
I should see a "Update Configuration File" button
00:00:00.017
@skip_if_github_validation
@ssh_minion
@scope_action_chains
@scope_salt_ssh
Scenario: Subscribe system to configuration channel for testing action chain on SSH minion
Given
I am on the Systems overview page of this "ssh_minion"
00:00:01.617
When
I follow "Configuration" in the content area
00:00:00.069
And
I follow "Manage Configuration Channels" in the content area
00:00:00.066
And
I follow first "Subscribe to Channels" in the content area
00:00:00.085
And
I check "Action Chain Channel" in the list
00:00:00.056
And
I click on "Continue"
00:00:00.563
And
I click on "Update Channel Rankings"
00:00:00.756
Then
I should see a "Channel Subscriptions successfully changed for" text
00:00:00.177
@skip_if_github_validation
@ssh_minion
@scope_action_chains
@scope_salt_ssh
Scenario: Add a configuration file deployment to the action chain on SSH minion
When
I follow the left menu "Configuration > Channels"
00:00:00.110
And
I follow "Action Chain Channel"
00:00:00.444
And
I follow "Deploy Files" in the content area
00:00:00.066
And
I click on "Deploy All Files"
00:00:00.578
And
I check the "ssh_minion" client
00:00:00.059
And
I click on "Confirm & Deploy to Selected Systems"
00:00:01.434
And
I check radio button "schedule-by-action-chain"
00:00:10.074
And
I click on "Deploy Files to Selected Systems"
00:00:00.688
Then
I should see a "Action has been successfully added to the Action Chain" text
00:00:00.172
@skip_if_github_validation
@ssh_minion
@scope_action_chains
@scope_salt_ssh
Scenario: Add apply highstate to action chain on SSH minion
Given
I am on the Systems overview page of this "ssh_minion"
00:00:01.720
When
I follow "States" in the content area
00:00:00.067
And
I check radio button "schedule-by-action-chain"
00:00:10.074
And
I click on "Apply Highstate"
00:00:00.058
@skip_if_github_validation
@ssh_minion
@scope_action_chains
@scope_salt_ssh
Scenario: Add a reboot action to the action chain on SSH minion
Given
I am on the Systems overview page of this "ssh_minion"
00:00:01.677
When
I follow first "Schedule System Reboot"
00:00:00.583
And
I check radio button "schedule-by-action-chain"
00:00:10.052
And
I click on "Reboot system"
00:00:00.771
Then
I should see a "Action has been successfully added to the Action Chain" text
00:00:00.216
@skip_if_github_validation
@ssh_minion
@scope_action_chains
@scope_salt_ssh
Scenario: Add a remote command to the action chain on SSH minion
When
I follow "Details" in the content area
00:00:00.074
When
I follow "Remote Command" in the content area
00:00:00.066
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.053
And
I click on "Schedule"
00:00:00.479
Then
I should see a "Action has been successfully added to the Action Chain" text
00:00:00.191
@skip_if_github_validation
@ssh_minion
@scope_action_chains
@scope_salt_ssh
Scenario: Verify the action chain list on SSH minion
When
I follow the left menu "Schedule > Action Chains"
00:00:00.128
And
I follow "minssh_action_chain"
00:00:00.319
Then
I should see a "1. Apply patch(es) andromeda-dummy-6789 on 1 system" text
00:00:00.202
And
I should see a "2. Remove milkyway-dummy from 1 system" text
00:00:00.189
And
I should see a "3. Install or update virgo-dummy on 1 system" text
00:00:00.192
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.182
And
I should see a "6. Reboot 1 system" text
00:00:00.186
And
I should see a "7. Run a remote command on 1 system" text
00:00:00.182
@skip_if_github_validation
@ssh_minion
@scope_action_chains
@scope_salt_ssh
Scenario: Check that a different user cannot see the action chain for SSH minion
Given
I am authorized as "testing" with password "testing"
00:00:02.441
When
I follow the left menu "Schedule > Action Chains"
00:00:00.113
Then
I should not see a "minssh_action_chain" link
00:00:00.008
@skip_if_github_validation
@ssh_minion
@scope_action_chains
@scope_salt_ssh
Scenario: Execute the action chain from the web UI on SSH minion
Given
I am authorized for the "Admin" section
00:00:02.033
When
I follow the left menu "Schedule > Action Chains"
00:00:00.106
And
I wait until I see "minssh_action_chain" text
00:00:00.151
And
I follow "minssh_action_chain"
00:00:00.337
Then
I click on "Save and Schedule"
00:00:00.057
And
I should see a "Action Chain minssh_action_chain has been scheduled for execution." text
00:00:00.660
@skip_if_github_validation
@ssh_minion
@scope_action_chains
@scope_salt_ssh
Scenario: Verify that the action chain was executed successfully
When
I wait for "virgo-dummy" to be installed on "ssh_minion"
00:00:51.541
And
I wait at most 300 seconds until file "/tmp/action_chain_one_system_done" exists on "ssh_minion"
00:05:01.001
+ Show Error
+ Screenshot
Timeout after 300 seconds (repeat_until_timeout) (Timeout::Error) ./features/support/commonlib.rb:107:in `block in repeat_until_timeout' ./features/support/commonlib.rb:89:in `repeat_until_timeout' ./features/step_definitions/command_steps.rb:822:in `/^I wait at most (\d+) seconds until file "([^"]*)" exists on "([^"]*)"$/' features/secondary/minssh_action_chain.feature:177:in `I wait at most 300 seconds until file "/tmp/action_chain_one_system_done" exists on "ssh_minion"'
@skip_if_github_validation
@ssh_minion
@scope_action_chains
@scope_salt_ssh
Scenario: Create a custom action chain for the SSH minion
When
I create an action chain with label "minssh_action_chain_to_delete" via API
00:00:00.936
And
I follow the left menu "Schedule > Action Chains"
00:00:00.073
Then
I should see a "minssh_action_chain_to_delete" text
00:00:00.152
@skip_if_github_validation
@ssh_minion
@scope_action_chains
@scope_salt_ssh
Scenario: Add a remote command to the action chain on SSH minion
Given
I am on the Systems overview page of this "ssh_minion"
00:00:01.546
When
I follow "Remote Command"
00:00:00.504
And
I enter as remote command this script in
00:00:00.051
#!/bin/bash uptime
And
I check radio button "schedule-by-action-chain"
00:00:10.055
And
I click on "Schedule"
00:00:00.424
Then
I should see a "Action has been successfully added to the Action Chain" text
00:00:00.192
@skip_if_github_validation
@ssh_minion
@scope_action_chains
@scope_salt_ssh
Scenario: Delete the action chain for SSH minion
When
I follow the left menu "Schedule > Action Chains"
00:00:00.121
And
I follow "minssh_action_chain_to_delete"
00:00:00.305
And
I follow "Delete Action Chains" in the content area
00:00:00.097
Then
I click on "Delete"
00:00:00.414
@skip_if_github_validation
@ssh_minion
@scope_action_chains
@scope_salt_ssh
Scenario: Cleanup: roll back action chain effects on SSH minion
Given
I am on the Systems overview page of this "ssh_minion"
00:00:01.676
When
I run "rm /tmp/action_chain_done" on "ssh_minion" without error control
00:00:00.416
And
I enable repository "test_repo_rpm_pool" on this "ssh_minion"
00:00:00.549
And
I remove package "andromeda-dummy" from this "ssh_minion" without error control
00:00:01.896
And
I remove package "virgo-dummy" from this "ssh_minion" without error control
00:00:01.479
And
I install package "milkyway-dummy" on this "ssh_minion" without error control
00:00:01.571
And
I install old package "andromeda-dummy-1.0" on this "ssh_minion"
00:00:01.402
And
I follow "Software" in the content area
00:00:00.069
And
I click on "Update Package List"
00:00:00.060
And
I follow "Events" in the content area
00:00:00.071
And
I wait until I do not see "Package List Refresh scheduled" text, refreshing the page
00:00:24.177
And
I follow "Software" in the content area
00:00:00.060
And
I follow "List / Remove" in the content area
00:00:00.063
And
I enter "andromeda-dummy" as the filtered package name
00:00:00.257
And
I click on the filter button until page does contain "andromeda-dummy-1.0" text
00:00:00.628
When
I follow the left menu "Admin > Task Schedules"
00:00:00.149
And
I follow "errata-cache-default"
00:00:01.120
And
I follow "errata-cache-bunch"
00:00:00.395
And
I click on "Single Run Schedule"
00:00:01.327
Then
I should see a "bunch was scheduled" text
00:00:00.590
And
I wait until the table contains "FINISHED" or "SKIPPED" followed by "FINISHED" in its first rows
00:00:50.228
@skip_if_github_validation
@ssh_minion
@scope_action_chains
@scope_salt_ssh
Scenario: Add operations to the action chain via API for SSH minions
Given
I want to operate on this "ssh_minion"
00:00:00.959
When
I create an action chain with label "minssh_api_chain" via API
00:00:00.982
And
I add a package install to the action chain via API
00:00:02.947
And
I add a package removal to the action chain via API
00:00:02.140
And
I add a package upgrade to the action chain via API
00:00:01.982
And
I add the script "exit 1;" to the action chain via API
00:00:00.954
Running actions: - Run an arbitrary script - Package Install/Upgrade - Package Install/Upgrade - Package Removal
- Removed "Run an arbitrary script" action - Removed "Package Install/Upgrade" action - Removed "Package Install/Upgrade" action - Removed "Package Removal" action
Then
the current action chain should be empty
00:00:00.941
And
I delete the action chain via API
00:00:00.975
@skip_if_github_validation
@ssh_minion
@scope_action_chains
@scope_salt_ssh
Scenario: Run an action chain via API on SSH minion
And
I want to operate on this "ssh_minion"
00:00:02.204
When
I create an action chain with label "minssh_multiple_scripts" via API
00:00:00.963
And
I add the script "echo -n 1 >> /tmp/action_chain.log" to the action chain via API
00:00:00.967
And
I add the script "echo -n 2 >> /tmp/action_chain.log" to the action chain via API
00:00:00.945
And
I add the script "echo -n 3 >> /tmp/action_chain.log" to the action chain via API
00:00:00.946
And
I add the script "touch /tmp/action_chain_done" to the action chain via API
00:00:00.944
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.024
Then
I wait until there are no more action chains listed via API
00:00:00.992
When
I wait until file "/tmp/action_chain_done" exists on "ssh_minion"
00:00:25.509
Then
file "/tmp/action_chain.log" should contain "123" on "ssh_minion"
00:00:00.829
When
I wait until there are no more scheduled actions listed via API
00:00:01.010
@skip_if_github_validation
@ssh_minion
@scope_action_chains
@scope_salt_ssh
Scenario: Cleanup: remove SSH minion from configuration channel
When
I follow the left menu "Configuration > Channels"
00:00:00.155
And
I follow "Action Chain Channel"
00:00:00.434
And
I follow "Systems" in the content area
00:00:00.080
And
I check the "ssh_minion" client
00:00:00.062
And
I click on "Unsubscribe systems"
00:00:00.820
Then
I should see a "Successfully unsubscribed 1 system(s)." text
00:00:00.145
@skip_if_github_validation
@ssh_minion
@scope_action_chains
@scope_salt_ssh
Scenario: Cleanup: remove configuration channel for SSH minion
When
I follow the left menu "Configuration > Channels"
00:00:00.059
And
I follow "Action Chain Channel"
00:00:00.424
And
I follow "Delete Channel"
00:00:00.294
And
I click on "Delete Config Channel"
00:00:00.352
@skip_if_github_validation
@ssh_minion
@scope_action_chains
@scope_salt_ssh
Scenario: Cleanup: remove packages and repository used in action chain for SSH minion
When
I remove package "andromeda-dummy" from this "ssh_minion" without error control
00:00:01.369
And
I remove package "virgo-dummy" from this "ssh_minion" without error control
00:00:00.830
And
I remove package "milkyway-dummy" from this "ssh_minion" without error control
00:00:01.349
And
I disable repository "test_repo_rpm_pool" on this "ssh_minion" without error control
00:00:00.452
@skip_if_github_validation
@ssh_minion
@scope_action_chains
@scope_salt_ssh
Scenario: Cleanup: remove temporary files for testing action chains on SSH minion
When
I run "rm -f /tmp/action_chain.log" on "ssh_minion" without error control
00:00:00.410
And
I run "rm -f /tmp/action_chain_done" on "ssh_minion" without error control
00:00:00.408
And
I run "rm -f /etc/action-chain.cnf" on "ssh_minion" without error control
00:00:00.413
And
I run "rm -f /tmp/action_chain_one_system_done" on "ssh_minion" without error control
00:00:00.412