Skip to content

Commit

Permalink
Add Test for latest rundeck v5.7.0-20241021
Browse files Browse the repository at this point in the history
  • Loading branch information
bastelfreak committed Dec 3, 2024
1 parent 964c667 commit 068f0e8
Showing 1 changed file with 39 additions and 24 deletions.
63 changes: 39 additions & 24 deletions spec/acceptance/rundeck_spec.rb
Original file line number Diff line number Diff line change
Expand Up @@ -4,21 +4,38 @@

describe 'rundeck class' do
context 'default parameters' do
it 'applies successfully' do
pp = <<-EOS
class { 'java':
distribution => 'jre',
}
class { 'rundeck':
package_ensure => '5.0.2.20240212-1',
}
it_behaves_like 'an idempotent resource' do
let(:manifest) do
<<-PUPPET
class { 'java':
distribution => 'jre',
}
class { 'rundeck':
package_ensure => '5.0.2.20240212-1',
}
Class['java'] -> Class['rundeck']
PUPPET
end
end
describe package('rundeck') do
it { is_expected.to be_installed }
end

Class['java'] -> Class['rundeck']
EOS
describe service('rundeckd') do
it { is_expected.to be_enabled }
it { is_expected.to be_running }
end
end

# Run it twice and test for idempotency
apply_manifest(pp, catch_failures: true, debug: true)
apply_manifest(pp, catch_changes: true, debug: true)
context 'updrade to 5.2.0.20240410-1' do
it_behaves_like 'an idempotent resource' do
let(:manifest) do
<<-PUPPET
class { 'rundeck':
package_ensure => '5.2.0.20240410-1',
}
PUPPET
end
end

describe package('rundeck') do
Expand All @@ -31,17 +48,15 @@ class { 'rundeck':
end
end

context 'updrade to latest version' do
it 'applies successfully' do
pp = <<-EOS
class { 'rundeck':
package_ensure => '5.2.0.20240410-1',
}
EOS

# Run it twice and test for idempotency
apply_manifest(pp, catch_failures: true)
apply_manifest(pp, catch_changes: true)
context 'updrade to 5.7.0-20241021' do
it_behaves_like 'an idempotent resource' do
let(:manifest) do
<<-PUPPET
class { 'rundeck':
package_ensure => '5.7.0-20241021',
}
PUPPET
end
end

describe package('rundeck') do
Expand Down

0 comments on commit 068f0e8

Please sign in to comment.