Commit f4770a7c authored by Tim Meusel's avatar Tim Meusel

fix spec errors in jenkins_cli_helper_spec.rb

parent ab7f8e35
......@@ -2,41 +2,28 @@
#
# A helper script for creating resources via the Jenkins cli
#
# Parameters:
#
# ssh_keyfile = undef
# Defaults to the value of $::jenkins::cli_ssh_keyfile. This parameter is
# deprecated, please set $::jenkins::cli_ssh_keyfile instead of setting this
# directly
#
class jenkins::cli_helper (
Optional[Stdlib::Absolutepath] $ssh_keyfile = $::jenkins::cli_ssh_keyfile,
) {
include ::jenkins
include ::jenkins::cli
class jenkins::cli_helper {
include jenkins
include jenkins::cli
Class['jenkins::cli']
-> Class['jenkins::cli_helper']
-> Anchor['jenkins::end']
-> Class['jenkins::cli_helper']
-> Anchor['jenkins::end']
$libdir = $::jenkins::libdir
$cli_jar = $::jenkins::cli::jar
$libdir = $jenkins::libdir
$cli_jar = $jenkins::cli::jar
$port = jenkins_port()
$prefix = jenkins_prefix()
$helper_groovy = "${libdir}/puppet_helper.groovy"
file { $helper_groovy:
source => 'puppet:///modules/jenkins/puppet_helper.groovy',
owner => $::jenkins::user,
group => $::jenkins::group,
owner => $jenkins::user,
group => $jenkins::group,
mode => '0444',
require => Class['jenkins::cli'],
}
if $ssh_keyfile != $::jenkins::cli_ssh_keyfile {
info("Using jenkins::cli_helper(${ssh_keyfile}) is deprecated and will be removed in the next major version of this module")
}
$helper_cmd = join(
delete_undef_values([
'/bin/cat',
......
......@@ -29,14 +29,4 @@ describe 'jenkins::cli_helper', type: :class do
mode: '0444'
)
end
context 'should accept the ssh_keyfile parameter' do
let(:params) do
{
ssh_keyfile: '/tmp/rspec'
}
end
it { is_expected.to contain_class 'jenkins::cli_helper' }
end
end
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment