Skip to content

Commit

Permalink
Merge pull request #9209 from Bischoff/ssh-tunnel-idempotency
Browse files Browse the repository at this point in the history
SSH tunnel idempotency
  • Loading branch information
deneb-alpha authored Sep 11, 2024
2 parents a778053 + f47be1b commit 3ecdabc
Show file tree
Hide file tree
Showing 5 changed files with 22 additions and 23 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@
# If the DEBLIKE-KEY fails to be created:
# - features/secondary/min_debike_salt.feature
# If the SUSE-SSH-KEY-x86_64 fails to be created:
# - features/secondary/min_ssh_tunnel.feature
# - features/secondary/minssh_tunnel.feature
# - features/secondary/minssh_move_from_and_to_proxy.feature


Expand Down
28 changes: 14 additions & 14 deletions testsuite/features/secondary/min_bootstrap_script.feature
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
# Licensed under the terms of the MIT license.
#
# This feature can cause failures in the following features:
# - features/secondary/min_ssh_tunnel.feature
# - features/secondary/minssh_tunnel.feature
# If the minion fails to bootstrap

# TODO: This feature is not working within a proxy containerized environment
Expand Down Expand Up @@ -78,17 +78,17 @@ Feature: Register a Salt minion with a bootstrap script
And I wait until event "Subscribe channels scheduled by admin" is completed

Scenario: Install a package to the script-bootstrapped SLES minion
Given I am on the Systems overview page of this "sle_minion"
When I follow "Software" in the content area
And I follow "Install"
And I enter "orion-dummy" as the filtered package name
And I click on the filter button
And I check row with "orion-dummy" and arch of "sle_minion"
And I click on "Install Selected Packages"
And I click on "Confirm"
Then I should see a "1 package install has been scheduled for" text
When I wait until event "Package Install/Upgrade scheduled by admin" is completed
Then "orion-dummy-1.1-1.1" should be installed on "sle_minion"
Given I am on the Systems overview page of this "sle_minion"
When I follow "Software" in the content area
And I follow "Install"
And I enter "orion-dummy" as the filtered package name
And I click on the filter button
And I check row with "orion-dummy" and arch of "sle_minion"
And I click on "Install Selected Packages"
And I click on "Confirm"
Then I should see a "1 package install has been scheduled for" text
When I wait until event "Package Install/Upgrade scheduled by admin" is completed
Then "orion-dummy-1.1-1.1" should be installed on "sle_minion"

Scenario: Run a remote command on normal SLES minion
When I follow the left menu "Salt > Remote Commands"
Expand All @@ -107,5 +107,5 @@ Feature: Register a Salt minion with a bootstrap script
Then I run spacecmd listeventhistory for "sle_minion"

Scenario: Cleanup: remove package from script-bootstrapped SLES minion
When I remove package "orion-dummy-1.1-1.1" from this "sle_minion"
Then "orion-dummy-1.1-1.1" should not be installed on "sle_minion"
When I remove package "orion-dummy-1.1-1.1" from this "sle_minion"
Then "orion-dummy-1.1-1.1" should not be installed on "sle_minion"
4 changes: 2 additions & 2 deletions testsuite/features/secondary/minssh_bootstrap_api.feature
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@ Feature: Register a salt-ssh system via API
Then "ssh_minion" should not be registered

@proxy
Scenario: block direct access from server to sshminion to test proxy as jumphost
Scenario: Block direct access from server to sshminion to test proxy as jumphost
Given I block connections from "server" on "ssh_minion"

Scenario: Bootstrap a SLES SSH minion via API
Expand Down Expand Up @@ -91,5 +91,5 @@ Feature: Register a salt-ssh system via API
And I wait until event "Subscribe channels scheduled by admin" is completed

@proxy
Scenario: cleanup and flush the firewall rules
Scenario: Cleanup and flush the firewall rules
When I flush firewall on "ssh_minion"
Original file line number Diff line number Diff line change
Expand Up @@ -89,9 +89,8 @@ Feature: Register a Salt system to be managed via SSH tunnel
And I wait until I see "has been deleted" text
Then "ssh_minion" should not be registered

Scenario: Cleanup: register a Salt minion after SSH tunnel tests
When I bootstrap "ssh_minion" using bootstrap script with activation key "1-SUSE-SSH-KEY-x86_64" from the server
And I wait at most 10 seconds until Salt master sees "ssh_minion" as "unaccepted"
And I accept "ssh_minion" key in the Salt master
Then I should see "ssh_minion" via spacecmd
Scenario: Cleanup: register a SSH minion after SSH tunnel tests
When I call system.bootstrap() on host "ssh_minion" and salt-ssh "enabled"
And I follow the left menu "Systems > Overview"
And I wait until I see the name of "ssh_minion", refreshing the page
And I wait until onboarding is completed for "ssh_minion"
2 changes: 1 addition & 1 deletion testsuite/run_sets/secondary.yml
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,7 @@
- features/secondary/minssh_bootstrap_api.feature
- features/secondary/min_bootstrap_ssh_key.feature
- features/secondary/min_bootstrap_script.feature
- features/secondary/min_ssh_tunnel.feature
- features/secondary/minssh_tunnel.feature
- features/secondary/min_activationkey.feature
- features/secondary/min_salt_minions_page.feature
- features/secondary/min_salt_mgrcompat_state.feature
Expand Down

0 comments on commit 3ecdabc

Please sign in to comment.