Skip to content

Commit

Permalink
fix acceptance tests, make chown in make_site_pp static
Browse files Browse the repository at this point in the history
  • Loading branch information
zilchms committed Feb 7, 2024
1 parent 59f28ec commit 4f78862
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 4 deletions.
2 changes: 1 addition & 1 deletion spec/acceptance/hiera_spec.rb
Original file line number Diff line number Diff line change
Expand Up @@ -84,7 +84,7 @@ class myclass {

it 'finds it in puppet agent' do
make_site_pp(default, pp, manifestsdir)
expect(on(default, puppet('agent', '-t', '--server', '$(hostname -f)'), acceptable_exit_codes: [0, 2]).stdout.strip).to match(%r{found output})
expect(on(default, 'puppet agent -t --server $(hostname -f)', acceptable_exit_codes: [0, 2]).stdout.strip).to match(%r{found output})
end
end
end
6 changes: 3 additions & 3 deletions spec/spec_helper_acceptance.rb
Original file line number Diff line number Diff line change
Expand Up @@ -3,10 +3,10 @@
require 'voxpupuli/acceptance/spec_helper_acceptance'

configure_beaker do |host|
install_module_from_forge_on(host, 'puppetlabs-puppetserver_gem', '>= 0')
install_module_via_pmt_on(host, 'puppetlabs-puppetserver_gem', '>= 0')
unless ENV['BEAKER_provision'] == 'no'
install_package(host, 'puppetserver')
on host, puppet('resource', 'service', 'puppetserver', 'ensure=running')
on host, 'puppet resource service puppetserver ensure=running'
end
end

Expand All @@ -26,7 +26,7 @@ def wait_for_puppetserver(host, max_retries)
def make_site_pp(host, pp, path)
on host, "mkdir -p #{path}"
create_remote_file(host, File.join(path, 'site.pp'), pp)
on host, "chown -R #{puppet_user(host)}:#{puppet_group(host)} #{path}"
on host, "chown -R puppet:puppet #{path}"
on host, "chmod -R 0755 #{path}"
on host, 'service puppetserver restart'
wait_for_puppetserver(host, 3)
Expand Down

0 comments on commit 4f78862

Please sign in to comment.