Skip to content

Commit

Permalink
QE: Merge min_config_state_channel_subscriptions.feature and `min_c… (
Browse files Browse the repository at this point in the history
#9737)

* QE: Merge `min_config_state_channel_subscriptions.feature` and `min_config_state_channel.feature`

Fixes #7963

* QE: Solving somes errors in the TCs
  • Loading branch information
Pablogoliva authored Feb 7, 2025
1 parent 45bd440 commit 31b84c7
Show file tree
Hide file tree
Showing 3 changed files with 114 additions and 126 deletions.
115 changes: 114 additions & 1 deletion testsuite/features/secondary/min_config_state_channel.feature
Original file line number Diff line number Diff line change
@@ -1,11 +1,12 @@
# Copyright (c) 2018-2024 SUSE LLC.
# Copyright (c) 2018-2025 SUSE LLC.
# Licensed under the terms of the MIT license.
#
# This feature can cause failures in the following features when running in sequential:
# - features/secondary/min_config_state_channel_subscriptions.feature
# If the state channel fails to be deleted.

@skip_if_github_validation
@sle_minion
@scope_configuration_channels
Feature: Configuration state channels
In order to configure systems through Salt
Expand Down Expand Up @@ -74,3 +75,115 @@ Feature: Configuration state channels
When I click on "Delete Config Channel"
Then I should see a "Channel 'My State Channel' has been deleted." text
And I remove "/root/foobar" from "sle_minion"

Scenario: Create the 1st state channel
When I follow the left menu "Configuration > Channels"
And I follow "Create State Channel"
Then I should see a "New Config State Channel" text
When I enter "My State Channel" as "cofName"
And I enter "statechannel" as "cofLabel"
And I enter "This is a state channel" as "cofDescription"
And I enter "touch /root/statechannel:\n cmd.run:\n - creates: /root/statechannel" in the editor
And I click on "Create Config State Channel"
Then I should see a "State Channel" text
And I should see a "Channel Properties" text
And I should see a "Channel Information" text
And I should see a "Configuration Actions" text

Scenario: Create the 2nd state channel with same name
When I follow the left menu "Configuration > Channels"
And I follow "Create State Channel"
Then I should see a "New Config State Channel" text
When I enter "My State Channel" as "cofName"
And I enter "statechannel2" as "cofLabel"
And I enter "This is a state channel" as "cofDescription"
And I enter "touch /root/statechannel2:\n cmd.run:\n - creates: /root/statechannel2" in the editor
And I click on "Create Config State Channel"
Then I should see a "State Channel" text
And I should see a "Channel Properties" text
And I should see a "Channel Information" text
And I should see a "Configuration Actions" text

Scenario: Create the 3rd state channel with spacecmd
When I create channel "statechannel3" from spacecmd of type "state"
And I follow the left menu "Configuration > Channels"
Then I should see a "statechannel3" text
When I update init.sls from spacecmd with content "touch /tmp/statechannel3:\n cmd.run:\n - creates: /tmp/statechannel3" for channel "statechannel3"
And I get "/init.sls" file details for channel "statechannel3" via spacecmd
Then I should see "Revision: 2" in the output
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"
And I get "/init.sls" file details for channel "statechannel3" via spacecmd
Then I should see "Revision: 100" in the output

Scenario: Subscribe a minion to 1st and 2nd state channels
When I am on the Systems overview page of this "sle_minion"
And I follow "States" in the content area
And I follow "Configuration Channels" in the content area
And I click on "Search" in element "search-row"
Then I should see a "My State Channel" text
And I should see a "statechannel" text
And I should see a "statechannel2" text
When I check "statechannel-cbox"
And I check "statechannel2-cbox"
And I click on "Save Changes"
And I wait until I see "Edit Channel Ranks" text
Then I should see a "My State Channel (statechannel)" link
And I should see a "My State Channel (statechannel2)" link
When I click on "Confirm"
Then I should see a "State assignments have been saved." text

Scenario: Apply the Configuration channel state
When I follow "States" in the content area
And I follow "Configuration Channels" in the content area
And I click on "Search" in element "search-row"
And I wait until I see "Execute States" text
And I click on "Execute States"
Then I should see a "Applying the config channels has been scheduled" text
And I wait until event "Apply states [custom] scheduled" is completed
And I wait until file "/root/statechannel" exists on "sle_minion"
And I wait until file "/root/statechannel2" exists on "sle_minion"

Scenario: Subscribe a minion to the 3rd state channel
When I follow "States" in the content area
And I follow "Configuration Channels" in the content area
Then I should see a "My State Channel" text
And I should see a "statechannel3" text
When I check "statechannel3-cbox"
And I click on "Save Changes"
And I wait until I see "Edit Channel Ranks" text
And I should see a "My State Channel (statechannel)" link
And I should see a "My State Channel (statechannel2)" link
And I should see a "statechannel3 (statechannel3)" link
When I click on "Confirm"
Then I should see a "State assignments have been saved." text

Scenario: Apply the Configuration channel state with spacecmd
When I schedule apply configchannels for "sle_minion"
And I wait until file "/root/statechannel3" exists on "sle_minion"

Scenario: Cleanup: remove the 1st state channel and the deployed file
When I follow the left menu "Configuration > Channels"
And I follow first "My State Channel"
And I follow "Delete Channel"
Then I should see a "Are you sure you want to delete this config channel?" text
When I click on "Delete Config Channel"
Then I should see a "Channel 'My State Channel' has been deleted." text
When I remove "/root/statechannel" from "sle_minion"

Scenario: Cleanup: remove the 2nd state channel and the deployed file
When I follow the left menu "Configuration > Channels"
And I follow first "My State Channel"
And I follow "Delete Channel"
Then I should see a "Are you sure you want to delete this config channel?" text
When I click on "Delete Config Channel"
Then I should see a "Channel 'My State Channel' has been deleted." text
When I remove "/root/statechannel2" from "sle_minion"

Scenario: Cleanup: remove the 3rd state channel and the deployed file
When I follow the left menu "Configuration > Channels"
And I follow first "statechannel3"
And I follow "Delete Channel"
Then I should see a "Are you sure you want to delete this config channel?" text
When I click on "Delete Config Channel"
Then I should see a "Channel 'statechannel3' has been deleted." text
When I remove "/root/statechannel3" from "sle_minion"

This file was deleted.

1 change: 0 additions & 1 deletion testsuite/run_sets/secondary_parallelizable.yml
Original file line number Diff line number Diff line change
Expand Up @@ -70,7 +70,6 @@
- features/secondary/min_salt_user_states.feature
- features/secondary/min_salt_minion_details.feature
- features/secondary/min_config_state_channel.feature
- features/secondary/min_config_state_channel_subscriptions.feature
- features/secondary/min_config_state_channel_api.feature
- features/secondary/min_salt_pkgset_beacon.feature
- features/secondary/min_custom_pkg_download_endpoint.feature
Expand Down

0 comments on commit 31b84c7

Please sign in to comment.