@sle_minion
@scope_configuration_channels
Feature: 0136 - Configuration state channels
Description: In order to configure systems through Salt
I want to be able to use the state channels
File name: min_config_state_channel.feature
Relative path: secondary/min_config_state_channel.feature
@sle_minion
@scope_configuration_channels
Scenario: Create a state channel
When
I follow the left menu "Configuration > Channels"
00:00:00.132
And
I follow "Create State Channel"
00:00:00.274
Then
I should see a "New Config State Channel" text
00:00:00.138
When
I enter "My State Channel" as "cofName"
00:00:00.070
And
I enter "statechannel" as "cofLabel"
00:00:00.059
And
I enter "This is a state channel" as "cofDescription"
00:00:00.067
And
I enter "touch /root/foobar:\n cmd.run:\n - creates: /root/foobar" in the editor
00:00:00.004
And
I click on "Create Config State Channel"
00:00:00.068
Then
I should see a "State Channel" text
00:00:00.159
And
I should see a "Channel Properties" text
00:00:00.159
And
I should see a "Channel Information" text
00:00:00.152
And
I should see a "Configuration Actions" text
00:00:00.154
@sle_minion
@scope_configuration_channels
Scenario: Subscribe a minion to the state channel
When
I am on the Systems overview page of this "sle_minion"
00:00:01.532
And
I follow "Configuration" in the content area
00:00:00.067
And
I follow "Manage Configuration Channels" in the content area
00:00:00.065
And
I follow first "Subscribe to Channels" in the content area
00:00:00.062
And
I check "My State Channel" in the list
00:00:00.063
And
I click on "Continue"
00:00:00.600
And
I click on "Update Channel Rankings"
00:00:00.751
Then
I should see a "Channel Subscriptions successfully changed for" text
00:00:00.173
When
I follow the left menu "Configuration > Channels"
00:00:00.115
And
I follow "My State Channel"
00:00:00.421
Then
I should see a "1 system subscribed" text
00:00:00.160
When
I follow "View/Edit 'init.sls' File"
00:00:00.334
Then
I should see a "Revision 1 of /init.sls from channel My State Channel" text
00:00:00.179
And
I should see a "File Contents" text
00:00:00.182
And
I should see a "touch /root/foobar:" text
00:00:00.177
When
I am on the Systems overview page of this "sle_minion"
00:00:01.648
And
I follow "States" in the content area
00:00:00.068
And
I follow "Configuration Channels" in the content area
00:00:00.071
Then
I should see a "Execute States" button
00:00:00.274
When
I click on "Execute States"
00:00:00.052
Then
I should see a "Applying the config channels has been scheduled" text
00:00:00.251
When
I wait until event "Apply states [custom] scheduled" is completed
00:00:22.753
And
I wait until file "/root/foobar" exists on "sle_minion"
00:00:00.719
@sle_minion
@scope_configuration_channels
Scenario: Try to remove init.sls file
When
I follow the left menu "Configuration > Channels"
00:00:00.130
And
I follow "My State Channel"
00:00:00.509
And
I follow "View/Edit 'init.sls' File"
00:00:00.393
When
I follow "Delete"
00:00:00.250
And
I click on "Delete Configuration Revision"
00:00:00.532
Then
I should see a "Cannot delete the only revision for the init.sls file" text
00:00:00.189
And
I should see a "Revision 1 of /init.sls from channel My State Channel" text
00:00:00.177
@sle_minion
@scope_configuration_channels
Scenario: Cleanup: remove the state channel and the file
When
I follow the left menu "Configuration > Channels"
00:00:00.063
And
I follow "My State Channel"
00:00:00.433
And
I follow "Delete Channel"
00:00:00.286
Then
I should see a "Are you sure you want to delete this config channel?" text
00:00:00.129
When
I click on "Delete Config Channel"
00:00:00.057
Then
I should see a "Channel 'My State Channel' has been deleted." text
00:00:00.402
+ Show Error
+ Screenshot
Unable to find visible xpath "/html" (Capybara::ElementNotFound) ./features/support/commonlib.rb:125:in `check_text?' ./features/step_definitions/navigation_steps.rb:691:in `/^I should see a "([^"]*)" text$/' features/secondary/min_config_state_channel.feature:75:in `I should see a "Channel 'My State Channel' has been deleted." text'
And
I remove "/root/foobar" from "sle_minion"
0s
@sle_minion
@scope_configuration_channels
Scenario: Create the 1st state channel
When
I follow the left menu "Configuration > Channels"
00:00:00.070
And
I follow "Create State Channel"
00:00:00.372
Then
I should see a "New Config State Channel" text
00:00:00.156
When
I enter "My State Channel" as "cofName"
00:00:00.065
And
I enter "statechannel" as "cofLabel"
00:00:00.063
And
I enter "This is a state channel" as "cofDescription"
00:00:00.066
And
I enter "touch /root/statechannel:\n cmd.run:\n - creates: /root/statechannel" in the editor
00:00:00.005
And
I click on "Create Config State Channel"
00:00:00.066
Unable to find xpath "/html" (Capybara::ElementNotFound) ./features/support/commonlib.rb:125:in `check_text?' ./features/step_definitions/navigation_steps.rb:691:in `/^I should see a "([^"]*)" text$/' features/secondary/min_config_state_channel.feature:87:in `I should see a "State Channel" text'
And
I should see a "Channel Properties" text
0s
And
I should see a "Channel Information" text
0s
And
I should see a "Configuration Actions" text
0s
@sle_minion
@scope_configuration_channels
Scenario: Create the 2nd state channel with same name
When
I follow the left menu "Configuration > Channels"
00:00:00.065
And
I follow "Create State Channel"
00:00:00.288
Then
I should see a "New Config State Channel" text
00:00:00.135
When
I enter "My State Channel" as "cofName"
00:00:00.059
And
I enter "statechannel2" as "cofLabel"
00:00:00.055
And
I enter "This is a state channel" as "cofDescription"
00:00:00.063
And
I enter "touch /root/statechannel2:\n cmd.run:\n - creates: /root/statechannel2" in the editor
00:00:00.003
And
I click on "Create Config State Channel"
00:00:00.061
Then
I should see a "State Channel" text
00:00:00.943
And
I should see a "Channel Properties" text
00:00:00.152
And
I should see a "Channel Information" text
00:00:00.162
And
I should see a "Configuration Actions" text
00:00:00.147
@sle_minion
@scope_configuration_channels
Scenario: Create the 3rd state channel with spacecmd
When
I create channel "statechannel3" from spacecmd of type "state"
00:00:04.893
And
I follow the left menu "Configuration > Channels"
00:00:00.061
Then
I should see a "statechannel3" text
00:00:00.147
When
I update init.sls from spacecmd with content "touch /tmp/statechannel3:\n cmd.run:\n - creates: /tmp/statechannel3" for channel "statechannel3"
00:00:08.752
And
I get "/init.sls" file details for channel "statechannel3" via spacecmd
00:00:03.788
Then
I should see "Revision: 2" in the output
00:00:00.000
When
I update init.sls from spacecmd with content "touch /root/statechannel3:\n cmd.run:\n - creates: /root/statechannel3" for channel "statechannel3" and revision "100"
00:00:10.405
And
I get "/init.sls" file details for channel "statechannel3" via spacecmd
00:00:03.927
Then
I should see "Revision: 100" in the output
00:00:00.000
@sle_minion
@scope_configuration_channels
Scenario: Subscribe a minion to 1st and 2nd state channels
When
I am on the Systems overview page of this "sle_minion"
00:00:01.606
And
I follow "States" in the content area
00:00:00.078
And
I follow "Configuration Channels" in the content area
00:00:00.069
And
I click on "Search" in element "search-row"
00:00:00.071
Then
I should see a "My State Channel" text
00:00:00.160
And
I should see a "statechannel" text
00:00:00.163
And
I should see a "statechannel2" text
00:00:00.173
When
I check "statechannel-cbox"
00:00:00.084
And
I check "statechannel2-cbox"
00:00:00.079
And
I click on "Save Changes"
00:00:00.066
And
I wait until I see "Edit Channel Ranks" text
00:00:00.141
Then
I should see a "My State Channel (statechannel)" text
00:00:00.144
And
I should see a "My State Channel (statechannel2)" text
00:00:00.139
When
I click on "Confirm"
00:00:00.059
Then
I should see a "State assignments have been saved." text
00:00:00.254
@sle_minion
@scope_configuration_channels
Scenario: Apply the Configuration channel state
When
I follow "States" in the content area
00:00:00.060
And
I follow "Configuration Channels" in the content area
00:00:00.054
And
I click on "Search" in element "search-row"
00:00:00.059
And
I wait until I see "Execute States" text
00:00:00.160
And
I click on "Execute States"
00:00:00.056
Then
I should see a "Applying the config channels has been scheduled" text
00:00:00.281
And
I wait until event "Apply states [custom] scheduled" is completed
00:00:22.523
And
I wait until file "/root/statechannel" exists on "sle_minion"
00:00:00.720
And
I wait until file "/root/statechannel2" exists on "sle_minion"
00:00:00.420
@sle_minion
@scope_configuration_channels
Scenario: Subscribe a minion to the 3rd state channel
When
I follow "States" in the content area
00:00:00.060
And
I follow "Configuration Channels" in the content area
00:00:00.054
Then
I should see a "My State Channel" text
00:00:00.375
And
I should see a "statechannel3" text
00:00:00.159
When
I check "statechannel3-cbox"
00:00:00.087
And
I click on "Save Changes"
00:00:00.065
And
I wait until I see "Edit Channel Ranks" text
00:00:00.144
And
I should see a "My State Channel (statechannel)" text
00:00:00.144
And
I should see a "My State Channel (statechannel2)" text
00:00:00.149
And
I should see a "statechannel3 (statechannel3)" text
00:00:00.141
When
I click on "Confirm"
00:00:00.057
Then
I should see a "State assignments have been saved." text
00:00:00.262
@sle_minion
@scope_configuration_channels
Scenario: Cleanup: remove the 1st state channel and the deployed file
When
I follow the left menu "Configuration > Channels"
00:00:00.133
And
I follow first "My State Channel"
00:00:00.467
And
I follow "Delete Channel"
00:00:00.380
Then
I should see a "Are you sure you want to delete this config channel?" text
00:00:00.135
When
I click on "Delete Config Channel"
00:00:00.521
Then
I should see a "Channel 'My State Channel' has been deleted." text
00:00:00.158
When
I remove "/root/statechannel" from "sle_minion"
00:00:00.419
@sle_minion
@scope_configuration_channels
Scenario: Cleanup: remove the 2nd state channel and the deployed file
When
I follow the left menu "Configuration > Channels"
00:00:00.065
And
I follow first "My State Channel"
00:00:00.490
And
I follow "Delete Channel"
00:00:00.360
Then
I should see a "Are you sure you want to delete this config channel?" text
00:00:00.135
When
I click on "Delete Config Channel"
00:00:00.876
Then
I should see a "Channel 'My State Channel' has been deleted." text
00:00:00.151
When
I remove "/root/statechannel2" from "sle_minion"
00:00:00.417
@sle_minion
@scope_configuration_channels
Scenario: Cleanup: remove the 3rd state channel and the deployed file
When
I follow the left menu "Configuration > Channels"
00:00:00.080
And
I follow first "statechannel3"
00:00:00.486
And
I follow "Delete Channel"
00:00:00.352
Then
I should see a "Are you sure you want to delete this config channel?" text
00:00:00.131
When
I click on "Delete Config Channel"
00:00:00.430
Then
I should see a "Channel 'statechannel3' has been deleted." text
00:00:00.134
When
I remove "/root/statechannel3" from "sle_minion"
00:00:00.426