-
Notifications
You must be signed in to change notification settings - Fork 105
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
4 changed files
with
25 additions
and
97 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -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'], | ||
|
@@ -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'], | ||
|
@@ -249,7 +235,8 @@ | |
|
||
describe 'main tests' do | ||
it 'creates groups of matching names, assigns non-matching group, manages homedir, manages other properties, gives key, makes dotfiles, managevim false' do | ||
apply_manifest(pp_accounts_define, catch_failures: true) | ||
output = apply_manifest(pp_accounts_define, catch_failures: true) | ||
puts output.stdout | ||
|
||
expect(user('hunner')).to exist | ||
expect(user('hunner')).to belong_to_group 'hunner' | ||
|
@@ -283,7 +270,8 @@ | |
|
||
describe 'managevim set to true' do | ||
it '.vim file will be created' do | ||
apply_manifest(pp_with_managevim, catch_failures: true) | ||
output = apply_manifest(pp_with_managevim, catch_failures: true) | ||
puts output.stdout | ||
expect(file('/test/hunner/.vim')).to be_directory | ||
end | ||
end | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters