Skip to content

Commit 860c238

Browse files
committed
(CAT-1269) - CI Fixes
1 parent d1411e2 commit 860c238

File tree

2 files changed

+18
-29
lines changed

2 files changed

+18
-29
lines changed

spec/acceptance/user_spec.rb

Lines changed: 14 additions & 28 deletions
Original file line numberDiff line numberDiff line change
@@ -13,20 +13,13 @@
1313
ensure => directory,
1414
before => Accounts::User['hunner'],
1515
}
16-
if $facts['puppetversion'][0] == '6' {
17-
$key_test = [
18-
'ssh-rsa #{test_key} vagrant',
19-
'command="/bin/echo Hello",from="myhost.example.com,192.168.1.1" ssh-rsa #{test_key} vagrant2'
20-
]
21-
}
22-
else {
23-
$key_test = [#{' '}
24-
'ssh-rsa #{test_key} vagrant',
25-
'command="/bin/echo Hello",from="myhost.example.com,192.168.1.1" ssh-rsa #{test_key} vagrant2',
26-
'ecdsa-sha2-nistp256 #{ecdsa_test_key} vagrant3',
27-
'[email protected] #{ecdsa_sk_test_key} vagrant4'
28-
]
29-
}
16+
17+
$key_test = [#{' '}
18+
'ssh-rsa #{test_key} vagrant',
19+
'command="/bin/echo Hello",from="myhost.example.com,192.168.1.1" ssh-rsa #{test_key} vagrant2',
20+
'ecdsa-sha2-nistp256 #{ecdsa_test_key} vagrant3',
21+
'[email protected] #{ecdsa_sk_test_key} vagrant4'
22+
]
3023
3124
accounts::user { 'hunner':
3225
groups => ['root'],
@@ -55,20 +48,13 @@
5548
ensure => directory,
5649
before => Accounts::User['hunner'],
5750
}
58-
if $facts['puppetversion'][0] == '6' {
59-
$key_test = [
60-
'ssh-rsa #{test_key} vagrant',
61-
'command="/bin/echo Hello",from="myhost.example.com,192.168.1.1" ssh-rsa #{test_key} vagrant2'
62-
]
63-
}
64-
else {
65-
$key_test = [#{' '}
66-
'ssh-rsa #{test_key} vagrant',
67-
'command="/bin/echo Hello",from="myhost.example.com,192.168.1.1" ssh-rsa #{test_key} vagrant2',
68-
'ecdsa-sha2-nistp256 #{ecdsa_test_key} vagrant3',
69-
'[email protected] #{ecdsa_sk_test_key} vagrant4'
70-
]
71-
}
51+
52+
$key_test = [#{' '}
53+
'ssh-rsa #{test_key} vagrant',
54+
'command="/bin/echo Hello",from="myhost.example.com,192.168.1.1" ssh-rsa #{test_key} vagrant2',
55+
'ecdsa-sha2-nistp256 #{ecdsa_test_key} vagrant3',
56+
'[email protected] #{ecdsa_sk_test_key} vagrant4'
57+
]
7258
7359
accounts::user { 'hunner':
7460
groups => ['root'],

spec/spec_helper_acceptance_local.rb

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -93,7 +93,7 @@ def set_hieradata(hieradata)
9393
def clear_temp_hieradata
9494
if @temp_hieradata_dirs && !@temp_hieradata_dirs.empty?
9595
@temp_hieradata_dirs.each do |data_dir|
96-
if File.exists?(data_dir)
96+
if File.exist?(data_dir)
9797
FileUtils.rm_r(data_dir)
9898
end
9999
end
@@ -102,6 +102,9 @@ def clear_temp_hieradata
102102

103103
RSpec.configure do |c|
104104
c.before(:all) do
105+
# Set sticky bit for docker provisioner
106+
run_shell('chmod +t /tmp/') if ENV['TARGET_HOST'].match(/^localhost:/)
107+
105108
@temp_hieradata_dirs = @temp_hieradata_dirs || []
106109
@hiera_datadir = hiera_datadir
107110
end

0 commit comments

Comments
 (0)