Skip to content

Commit

Permalink
Add some naming and text formatting changes after review
Browse files Browse the repository at this point in the history
  • Loading branch information
meaksh committed Oct 10, 2024
1 parent b2c3289 commit bd3e10d
Show file tree
Hide file tree
Showing 3 changed files with 16 additions and 16 deletions.
18 changes: 9 additions & 9 deletions testsuite/features/secondary/srv_salt_git_pillar.feature
Original file line number Diff line number Diff line change
Expand Up @@ -4,26 +4,26 @@
@skip_if_github_validation
@sle_minion
@scope_salt
Feature: Salt Master integration with Git Pillar
Feature: Salt master integration with Git pillar

Scenario: Preparing Git Pillar configuration for Salt Master
When I setup a git_pillar environment on the Salt Master
Scenario: Preparing Git pillar configuration for Salt master
When I setup a git_pillar environment on the Salt master
And I wait for "30" seconds
Then file "/etc/salt/master.d/zz-testing-gitpillar.conf" should exist on server

Scenario: Check for the expected pillar data after enabling Git Pillar
Scenario: Check for the expected pillar data after enabling Git pillar
When I refresh the pillar data
Then the pillar data for "git_pillar_foobar" should be "12345" on "sle_minion"
And the pillar data for "org_id" should be "1" on "sle_minion"
And the pillar data for "git_pillar_foobar" should be "12345" on the Salt Master
And the pillar data for "git_pillar_foobar" should be "12345" on the Salt master

Scenario: Cleanup: Removing Git Pillar configuration for Salt Master
When I clean up the git_pillar environment on the Salt Master
Scenario: Cleanup: Remove Git pillar configuration for Salt master
When I clean up the git_pillar environment on the Salt master
And I wait for "30" seconds
Then file "/etc/salt/master.d/zz-testing-gitpillar.conf" should not exist on server

Scenario: Check for the expected pillar data after disabling Git Pillar
Scenario: Cleanup: Check for the expected pillar data after disabling Git pillar
When I refresh the pillar data
Then the pillar data for "git_pillar_foobar" should be empty on "sle_minion"
And the pillar data for "org_id" should be "1" on "sle_minion"
And the pillar data for "git_pillar_foobar" should be empty on the Salt Master
And the pillar data for "git_pillar_foobar" should be empty on the Salt master
8 changes: 4 additions & 4 deletions testsuite/features/step_definitions/salt_steps.rb
Original file line number Diff line number Diff line change
Expand Up @@ -72,7 +72,7 @@
node.run("#{salt_call} saltutil.refresh_grains")
end

When(/^I setup a git_pillar environment on the Salt Master$/) do
When(/^I setup a git_pillar environment on the Salt master$/) do
file = 'salt_git_pillar_setup.sh'
source = "#{File.dirname(__FILE__)}/../upload_files/#{file}"
dest = "/tmp/#{file}"
Expand All @@ -83,7 +83,7 @@
get_target('server').run("sh /tmp/#{file} setup", check_errors: true, verbose: true)
end

When(/^I clean up the git_pillar environment on the Salt Master$/) do
When(/^I clean up the git_pillar environment on the Salt master$/) do
file = 'salt_git_pillar_setup.sh'

# Execute "salt_git_pillar_setup.sh setup" on the server
Expand Down Expand Up @@ -395,12 +395,12 @@
end
end

Then(/^the pillar data for "([^"]*)" should be empty on the Salt Master$/) do |key|
Then(/^the pillar data for "([^"]*)" should be empty on the Salt master$/) do |key|
output = salt_master_pillar_get(key)
raise "Output value is not empty: #{output}" unless output == ''
end

Then(/^the pillar data for "([^"]*)" should be "([^"]*)" on the Salt Master$/) do |key, value|
Then(/^the pillar data for "([^"]*)" should be "([^"]*)" on the Salt master$/) do |key, value|
output = salt_master_pillar_get(key)
raise "Output value is different than #{value}: #{output}" unless output.to_s.strip == value
end
Expand Down
6 changes: 3 additions & 3 deletions testsuite/features/upload_files/salt_git_pillar_setup.sh
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
#!/bin/bash
#
# This script create the necessary files to setup a "git_pillar" environment
# together with SUSE Manager in order to provide some extra pillar data.
# together with Uyuni in order to provide some extra pillar data.
#
# Use as:
# salt_git_pillar_setup.sh setup -> Prepare environment
Expand All @@ -18,7 +18,7 @@
GIT_REPO="/tmp/test_salt_git_pillar.git"

if [ "$1" == "setup" ]; then
echo "Setting up git_pillar environment and restarting Salt Master and Salt API"
echo "Setting up git_pillar environment and restarting Salt master and Salt API"
zypper in -y git-core
mkdir $GIT_REPO
cd $GIT_REPO
Expand Down Expand Up @@ -59,7 +59,7 @@ EOF
fi

if [ "$1" == "clean" ]; then
echo "Cleaning git_pillar environment and restarting Salt Master and Salt API"
echo "Cleaning git_pillar environment and restarting Salt master and Salt API"
rm -rf $GIT_REPO
rm /etc/salt/master.d/zz-testing-gitpillar.conf
cp /root/.ssh/authorized_keys_backup_gitpillar /root/.ssh/authorized_keys
Expand Down

0 comments on commit bd3e10d

Please sign in to comment.