Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

(maint) Bump puppet agent version used in acceptance tests and fix them #513

Merged
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
6 changes: 3 additions & 3 deletions spec/acceptance/class_spec.rb
Expand Up @@ -10,7 +10,7 @@

it 'should work idempotently with no errors' do
pp = <<-EOS
class { 'puppet_agent': package_version => '5.5.16', collection => 'puppet5' }
class { 'puppet_agent': package_version => '5.5.21', collection => 'puppet5' }
EOS

apply_manifest(pp, :catch_failures => true)
Expand Down Expand Up @@ -140,7 +140,7 @@ class { 'puppet_agent': service_names => [] }
context 'with mcollective configured' do
before(:all) {
setup_puppet_on default, :mcollective => true, :agent => true
manifest = 'class { "puppet_agent": package_version => "5.5.16", collection => "puppet5", service_names => ["mcollective"] }'
manifest = 'class { "puppet_agent": package_version => "5.5.21", collection => "puppet5", service_names => ["mcollective"] }'
pp = "file { '#{master.puppet['codedir']}/environments/production/manifests/site.pp': ensure => file, content => '#{manifest}' }"
apply_manifest_on(master, pp, :catch_failures => true)
}
Expand Down Expand Up @@ -197,7 +197,7 @@ class { 'puppet_agent': collection => "puppet5", service_names => ["mcollective
end

let(:manifest) do <<-EOS
class { 'puppet_agent': package_version => '5.5.16', collection => 'puppet5', before => File['/tmp/a'] }
class { 'puppet_agent': package_version => '5.5.21', collection => 'puppet5', before => File['/tmp/a'] }
file { '/tmp/a': ensure => 'present' }
EOS
end
Expand Down
9 changes: 6 additions & 3 deletions spec/spec_helper_acceptance.rb
Expand Up @@ -42,7 +42,7 @@ def install_modules_on(host)
master['puppetservice'] = 'puppetserver'
master['puppetserver-confdir'] = '/etc/puppetlabs/puppetserver/conf.d'
master['type'] = 'aio'
install_puppet_agent_on master, {:version => ENV['PUPPET_CLIENT_VERSION'] || "5.5.14", :puppet_collection => 'puppet5'}
install_puppet_agent_on master, {:version => ENV['PUPPET_CLIENT_VERSION'] || "5.5.16", :puppet_collection => 'puppet5'}

install_modules_on master

Expand Down Expand Up @@ -127,7 +127,7 @@ def setup_puppet_on(host, opts = {})

puts "Setup aio puppet on #{host}"
configure_type_defaults_on host
install_puppet_agent_on host, {:version => ENV['PUPPET_CLIENT_VERSION'] || '5.5.14', :puppet_collection => 'puppet5'}
install_puppet_agent_on host, {:version => ENV['PUPPET_CLIENT_VERSION'] || '5.5.16', :puppet_collection => 'puppet5'}

puppet_opts = agent_opts(master.to_s)
if host['platform'] =~ /windows/i
Expand Down Expand Up @@ -202,8 +202,11 @@ def teardown_puppet_on(host)
clean_repo = "include apt\napt::source { 'pc_repo': ensure => absent, notify => Package['puppet-agent'] }"
when /fedora|el|centos/
clean_repo = "yumrepo { 'pc_repo': ensure => absent, notify => Package['puppet-agent'] }"
when /sles|osx/
when /osx/
ensure_type = 'absent'
when /sles/
ensure_type = 'absent'
clean_repo = "file { '/etc/zypp/repos.d/pc_repo.repo': ensure => absent, notify => Package['puppet-agent'] }"
else
logger.notify("Not sure how to remove repos on #{host['platform']}")
clean_repo = ''
Expand Down