Skip to content

Commit

Permalink
Merge pull request #456 from puppetlabs/CAT-1269-ci-fixes
Browse files Browse the repository at this point in the history
(CAT-1269) - CI Fixes
  • Loading branch information
malikparvez authored Aug 3, 2023
2 parents d1411e2 + 860c238 commit ec4b89a
Show file tree
Hide file tree
Showing 2 changed files with 18 additions and 29 deletions.
42 changes: 14 additions & 28 deletions spec/acceptance/user_spec.rb
Original file line number Diff line number Diff line change
Expand Up @@ -13,20 +13,13 @@
ensure => directory,
before => Accounts::User['hunner'],
}
if $facts['puppetversion'][0] == '6' {
$key_test = [
'ssh-rsa #{test_key} vagrant',
'command="/bin/echo Hello",from="myhost.example.com,192.168.1.1" ssh-rsa #{test_key} vagrant2'
]
}
else {
$key_test = [#{' '}
'ssh-rsa #{test_key} vagrant',
'command="/bin/echo Hello",from="myhost.example.com,192.168.1.1" ssh-rsa #{test_key} vagrant2',
'ecdsa-sha2-nistp256 #{ecdsa_test_key} vagrant3',
'[email protected] #{ecdsa_sk_test_key} vagrant4'
]
}
$key_test = [#{' '}
'ssh-rsa #{test_key} vagrant',
'command="/bin/echo Hello",from="myhost.example.com,192.168.1.1" ssh-rsa #{test_key} vagrant2',
'ecdsa-sha2-nistp256 #{ecdsa_test_key} vagrant3',
'[email protected] #{ecdsa_sk_test_key} vagrant4'
]
accounts::user { 'hunner':
groups => ['root'],
Expand Down Expand Up @@ -55,20 +48,13 @@
ensure => directory,
before => Accounts::User['hunner'],
}
if $facts['puppetversion'][0] == '6' {
$key_test = [
'ssh-rsa #{test_key} vagrant',
'command="/bin/echo Hello",from="myhost.example.com,192.168.1.1" ssh-rsa #{test_key} vagrant2'
]
}
else {
$key_test = [#{' '}
'ssh-rsa #{test_key} vagrant',
'command="/bin/echo Hello",from="myhost.example.com,192.168.1.1" ssh-rsa #{test_key} vagrant2',
'ecdsa-sha2-nistp256 #{ecdsa_test_key} vagrant3',
'[email protected] #{ecdsa_sk_test_key} vagrant4'
]
}
$key_test = [#{' '}
'ssh-rsa #{test_key} vagrant',
'command="/bin/echo Hello",from="myhost.example.com,192.168.1.1" ssh-rsa #{test_key} vagrant2',
'ecdsa-sha2-nistp256 #{ecdsa_test_key} vagrant3',
'[email protected] #{ecdsa_sk_test_key} vagrant4'
]
accounts::user { 'hunner':
groups => ['root'],
Expand Down
5 changes: 4 additions & 1 deletion spec/spec_helper_acceptance_local.rb
Original file line number Diff line number Diff line change
Expand Up @@ -93,7 +93,7 @@ def set_hieradata(hieradata)
def clear_temp_hieradata
if @temp_hieradata_dirs && !@temp_hieradata_dirs.empty?
@temp_hieradata_dirs.each do |data_dir|
if File.exists?(data_dir)
if File.exist?(data_dir)
FileUtils.rm_r(data_dir)
end
end
Expand All @@ -102,6 +102,9 @@ def clear_temp_hieradata

RSpec.configure do |c|
c.before(:all) do
# Set sticky bit for docker provisioner
run_shell('chmod +t /tmp/') if ENV['TARGET_HOST'].match(/^localhost:/)

@temp_hieradata_dirs = @temp_hieradata_dirs || []
@hiera_datadir = hiera_datadir
end
Expand Down

0 comments on commit ec4b89a

Please sign in to comment.