Skip to content

Commit 7935c79

Browse files
(maint) Initially manage puppet before testing
This changes the class_spec to initally manage puppet; puppet 7 and puppet 8 both are not enabled or running after installation, so there could be a bug in the initscripts somewhere or this was never actually a feature but a bug in how the tests were run.
1 parent 7fd28af commit 7935c79

File tree

1 file changed

+5
-7
lines changed

1 file changed

+5
-7
lines changed

spec/acceptance/class_spec.rb

Lines changed: 5 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,11 @@
33

44
describe 'puppet_agent class' do
55
context 'default parameters in apply' do
6-
before(:all) { setup_puppet_on default }
6+
before(:all) do
7+
setup_puppet_on default
8+
pp = "class { 'puppet_agent': package_version => 'auto'}"
9+
apply_manifest(pp, catch_failures: true)
10+
end
711
after(:all) { teardown_puppet_on default }
812

913
describe package(package_name(default)) do
@@ -34,9 +38,6 @@
3438
describe 'manage_repo parameter' do
3539
context 'when true (default)' do
3640
it 'creates repo config' do
37-
pp = "class { 'puppet_agent': }"
38-
apply_manifest(pp, catch_failures: true)
39-
wait_for_finish_on default
4041
case default['platform']
4142
when %r{debian|ubuntu}
4243
pp = "include apt\napt::source { 'pc_repo': ensure => present, location => 'https://apt.puppet.com', repos => 'puppet5'}"
@@ -53,9 +54,6 @@
5354

5455
context 'when false' do
5556
it 'ceases to manage repo config' do
56-
pp = "class { 'puppet_agent': }"
57-
apply_manifest(pp, catch_failures: true)
58-
wait_for_finish_on default
5957
case default['platform']
6058
when %r{debian|ubuntu}
6159
pp = "include apt\napt::source { 'pc_repo': ensure => absent }"

0 commit comments

Comments
 (0)