Skip to content

Commit 7fd28af

Browse files
committed
(maint) Delete duplicate tests
This code was last updated in Oct 2020 and all this time we've been testing "upgrades" from 7.x to 5.5.21. This only recently started to fail when stdlib v9 was released as the root_home fact uses Ruby syntax that's not valid in Puppet 5/Ruby 2.1.9. It's not practical to update the upgrade tests after each release. And we already test upgrades and idempotency in the acceptance/tests/*, so delete these tests.
1 parent ac83d4f commit 7fd28af

File tree

1 file changed

+0
-55
lines changed

1 file changed

+0
-55
lines changed

spec/acceptance/class_spec.rb

Lines changed: 0 additions & 55 deletions
Original file line numberDiff line numberDiff line change
@@ -6,22 +6,6 @@
66
before(:all) { setup_puppet_on default }
77
after(:all) { teardown_puppet_on default }
88

9-
it 'works idempotently with no errors' do
10-
pp = <<-EOS
11-
class { 'puppet_agent': package_version => '5.5.21', collection => 'puppet5' }
12-
EOS
13-
14-
apply_manifest(pp, catch_failures: true)
15-
wait_for_finish_on default
16-
configure_agent_on default
17-
# Run three times to ensure idempotency if upgrading with the package resource (MODULES-10666)
18-
unless %r{solaris-10|aix|osx|windows}i.match?(default['platform'])
19-
apply_manifest(pp, expect_changes: true)
20-
wait_for_finish_on default
21-
end
22-
apply_manifest(pp, catch_changes: true)
23-
end
24-
259
describe package(package_name(default)) do
2610
it { is_expected.to be_installed }
2711
end
@@ -117,43 +101,4 @@ class { 'puppet_agent': service_names => [] }
117101
it { is_expected.not_to be_running }
118102
end
119103
end
120-
121-
unless %r{windows}i.match?(default['platform'])
122-
unless %r{solaris-10|aix|osx|windows}i.match?(default['platform'])
123-
context 'on platforms managed with the package resource' do
124-
before(:all) { setup_puppet_on default }
125-
126-
after(:all) do
127-
on default, 'rm -f /tmp/a'
128-
teardown_puppet_on default
129-
end
130-
131-
let(:manifest) do
132-
<<-EOS
133-
class { 'puppet_agent': package_version => '5.5.21', collection => 'puppet5', before => File['/tmp/a'] }
134-
file { '/tmp/a': ensure => 'present' }
135-
EOS
136-
end
137-
138-
it 'upgrades the agent on the first run' do
139-
# First run should upgrade the agent
140-
apply_manifest(manifest, expect_changes: true)
141-
configure_agent_on default
142-
expect(package(package_name(default))).to be_installed
143-
expect(file('/tmp/a')).not_to exist
144-
end
145-
146-
it 'evaluates remanining resources on the second run' do
147-
# Second run should apply the file resource
148-
apply_manifest(manifest, expect_changes: true)
149-
expect(file('/tmp/a')).to exist
150-
end
151-
152-
it 'does nothing on future runs' do
153-
# Third run should not do anything
154-
apply_manifest(manifest, catch_changes: true)
155-
end
156-
end
157-
end
158-
end
159104
end

0 commit comments

Comments
 (0)