Skip to content

Commit

Permalink
fix issues with tests
Browse files Browse the repository at this point in the history
  • Loading branch information
madAndroid committed Jul 28, 2015
1 parent 0d5169a commit afb3a1a
Showing 1 changed file with 10 additions and 17 deletions.
27 changes: 10 additions & 17 deletions spec/defines/jenkins_credentials_spec.rb
Original file line number Diff line number Diff line change
Expand Up @@ -17,12 +17,10 @@
:ensure => 'present',
:password => 'mypass',
}}
it { should contain_exec('create-jenkins-credentials-mycreds').with({
:command => "#{helper_cmd} create_or_update_credentials #{title} 'mypass' '' 'Managed by Puppet' ''",
:unless => "#{helper_cmd} credential_info #{title} | grep #{title}",
:tries => '3',
:try_sleep => '5',
:require => 'Class[Jenkins::Cli_helper]',
it { should contain_jenkins__cli__exec('create-jenkins-credentials-mycreds').with({
:command => [ "create_or_update_credentials" , "#{title}", "'mypass'",
"''", "'Managed by Puppet'", "''" ],
:unless => "\$HELPER_CMD credential_info #{title} | grep #{title}",
})}
end

Expand All @@ -31,11 +29,8 @@
:ensure => 'absent',
:password => 'mypass',
}}
it { should contain_exec('delete-jenkins-credentials-mycreds').with({
:command => "#{helper_cmd} delete_credentials #{title}",
:tries => '3',
:try_sleep => '5',
:require => 'Class[Jenkins::Cli_helper]',
it { should contain_jenkins__cli__exec('delete-jenkins-credentials-mycreds').with({
:command => [ "delete_credentials", "#{title}" ],
})}
end

Expand All @@ -45,12 +40,10 @@
:password => 'mypass',
:uuid => 'e94d3b98-5ba4-43b9-89ed-79a08ea97f6f',
}}
it { should contain_exec('create-jenkins-credentials-mycreds').with({
:command => "#{helper_cmd} create_or_update_credentials #{title} 'mypass' 'e94d3b98-5ba4-43b9-89ed-79a08ea97f6f' 'Managed by Puppet' ''",
:unless => "#{helper_cmd} credential_info #{title} | grep #{title}",
:tries => '3',
:try_sleep => '5',
:require => 'Class[Jenkins::Cli_helper]',
it { should contain_jenkins__cli__exec('create-jenkins-credentials-mycreds').with({
:command => [ "create_or_update_credentials" , "#{title}", "'mypass'",
"'e94d3b98-5ba4-43b9-89ed-79a08ea97f6f'", "'Managed by Puppet'", "''" ],
:unless => "\$HELPER_CMD credential_info #{title} | grep #{title}",
})}
end

Expand Down

0 comments on commit afb3a1a

Please sign in to comment.