Skip to content

Commit

Permalink
Additional fixes for new version
Browse files Browse the repository at this point in the history
  • Loading branch information
wyardley authored and kajinamit committed Dec 19, 2023
1 parent faf7c6b commit 15e539d
Show file tree
Hide file tree
Showing 13 changed files with 22 additions and 25 deletions.
1 change: 0 additions & 1 deletion data/common.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,6 @@ rabbitmq::repo_gpg_key: ~
rabbitmq::package_name: 'rabbitmq'
rabbitmq::package_source: ~
rabbitmq::package_provider: ~
rabbitmq::repos_ensure: false
rabbitmq::manage_python: true
rabbitmq::python_package: 'python'
rabbitmq::rabbitmq_user: 'rabbitmq'
Expand Down
1 change: 0 additions & 1 deletion examples/full.pp
Original file line number Diff line number Diff line change
@@ -1,6 +1,5 @@
class { 'rabbitmq':
delete_guest_user => true,
repos_ensure => true,
package_apt_pin => 900,
}

Expand Down
8 changes: 4 additions & 4 deletions spec/acceptance/class_spec.rb
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@
context 'default class inclusion' do
let(:pp) do
<<-EOS
class { 'erlang': repo_source => 'packagecloud' } ->
class { 'erlang': } ->
class { 'rabbitmq': }
EOS
end
Expand Down Expand Up @@ -48,7 +48,7 @@ class { 'rabbitmq': }
context 'disable and stop service' do
let(:pp) do
<<-EOS
class { 'erlang': repo_source => 'packagecloud' } ->
class { 'erlang': } ->
class { 'rabbitmq':
service_ensure => 'stopped',
}
Expand All @@ -66,12 +66,12 @@ class { 'rabbitmq':
context 'service is unmanaged' do
it 'runs successfully' do
pp_pre = <<-EOS
class { 'erlang': repo_source => 'packagecloud' } ->
class { 'erlang': } ->
class { 'rabbitmq': }
EOS

pp = <<-EOS
class { 'erlang': repo_source => 'packagecloud' } ->
class { 'erlang': } ->
class { 'rabbitmq':
service_manage => false,
service_ensure => 'stopped',
Expand Down
6 changes: 3 additions & 3 deletions spec/acceptance/clustering_spec.rb
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
context 'rabbitmq::wipe_db_on_cookie_change => false' do
it 'runs successfully' do
pp = <<-EOS
class { 'erlang': repo_source => 'packagecloud' } ->
class { 'erlang': } ->
class { 'rabbitmq':
cluster => { 'name' => 'rabbit_cluster', 'init_node' => $facts['fqdn'] },
config_cluster => true,
Expand All @@ -28,7 +28,7 @@ class { 'rabbitmq':
context 'rabbitmq::wipe_db_on_cookie_change => true' do
it 'runs successfully' do
pp = <<-EOS
class { 'erlang': repo_source => 'packagecloud' } ->
class { 'erlang': } ->
class { 'rabbitmq':
cluster => { 'name' => 'rabbit_cluster', 'init_node' => $facts['fqdn'] },
config_cluster => true,
Expand Down Expand Up @@ -70,7 +70,7 @@ class { 'rabbitmq':
context 'rabbitmq::cluster[:local_node] = foobar' do
it 'runs successfully' do
pp = <<-EOS
class { 'erlang': repo_source => 'packagecloud' } ->
class { 'erlang': } ->
class { 'rabbitmq':
cluster => { 'name' => 'rabbit_cluster', 'init_node' => 'foobar', 'local_node' => 'foobar' },
config_cluster => true,
Expand Down
2 changes: 1 addition & 1 deletion spec/acceptance/delete_guest_user_spec.rb
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
context 'delete_guest_user' do
it 'runs successfully' do

Check failure on line 7 in spec/acceptance/delete_guest_user_spec.rb

View workflow job for this annotation

GitHub Actions / Puppet / 7 - Debian 10

rabbitmq with delete_guest_user delete_guest_user runs successfully Failure/Error: apply_manifest(pp, catch_failures: true) Beaker::Host::CommandFailure: Host 'debian10-64-puppet7.example.com' exited with 6 running: puppet apply --verbose --detailed-exitcodes /tmp/apply_manifest_093913020.pp.QWy8qM Last 10 lines of output were: Info: Class[Rabbitmq::Service]: Unscheduling all events on Class[Rabbitmq::Service] �[mNotice: /Stage[main]/Rabbitmq::Management/Rabbitmq_user[guest]: Dependency Service[rabbitmq-server] has failures: true Warning: /Stage[main]/Rabbitmq::Management/Rabbitmq_user[guest]: Skipping because of failed dependencies Info: Class[Rabbitmq]: Unscheduling all events on Class[Rabbitmq] Warning: /Stage[main]/Rabbitmq::Install::Rabbitmqadmin/Package[python]: Skipping because of failed dependencies Warning: /Stage[main]/Rabbitmq::Install::Rabbitmqadmin/Exec[remove_old_rabbitmqadmin_on_upgrade]: Skipping because of failed dependencies Warning: /Stage[main]/Rabbitmq::Install::Rabbitmqadmin/Archive[rabbitmqadmin]: Skipping because of failed dependencies Warning: /Stage[main]/Rabbitmq::Install::Rabbitmqadmin/File[/usr/local/bin/rabbitmqadmin]: Skipping because of failed dependencies Info: Stage[main]: Unscheduling all events on Stage[main] �[mNotice: Applied catalog in 55.17 seconds

Check failure on line 7 in spec/acceptance/delete_guest_user_spec.rb

View workflow job for this annotation

GitHub Actions / Puppet / 7 - Ubuntu 18.04

rabbitmq with delete_guest_user delete_guest_user runs successfully Failure/Error: apply_manifest(pp, catch_failures: true) Beaker::Host::CommandFailure: Host 'ubuntu1804-64-puppet7.example.com' exited with 6 running: puppet apply --verbose --detailed-exitcodes /tmp/apply_manifest_093936790.pp.D1joNs Last 10 lines of output were: Info: Class[Rabbitmq::Service]: Unscheduling all events on Class[Rabbitmq::Service] �[mNotice: /Stage[main]/Rabbitmq::Management/Rabbitmq_user[guest]: Dependency Service[rabbitmq-server] has failures: true Warning: /Stage[main]/Rabbitmq::Management/Rabbitmq_user[guest]: Skipping because of failed dependencies Info: Class[Rabbitmq]: Unscheduling all events on Class[Rabbitmq] Warning: /Stage[main]/Rabbitmq::Install::Rabbitmqadmin/Package[python]: Skipping because of failed dependencies Info: Stage[main]: Unscheduling all events on Stage[main] Warning: /Stage[main]/Rabbitmq::Install::Rabbitmqadmin/Exec[remove_old_rabbitmqadmin_on_upgrade]: Skipping because of failed dependencies Warning: /Stage[main]/Rabbitmq::Install::Rabbitmqadmin/Archive[rabbitmqadmin]: Skipping because of failed dependencies Warning: /Stage[main]/Rabbitmq::Install::Rabbitmqadmin/File[/usr/local/bin/rabbitmqadmin]: Skipping because of failed dependencies �[mNotice: Applied catalog in 54.66 seconds

Check failure on line 7 in spec/acceptance/delete_guest_user_spec.rb

View workflow job for this annotation

GitHub Actions / Puppet / 7 - Debian 10

rabbitmq with delete_guest_user delete_guest_user runs successfully Failure/Error: apply_manifest(pp, catch_failures: true) Beaker::Host::CommandFailure: Host 'debian10-64-puppet7.example.com' exited with 6 running: puppet apply --verbose --detailed-exitcodes /tmp/apply_manifest_112612491.pp.JSaVSq Last 10 lines of output were: Info: Class[Rabbitmq::Service]: Unscheduling all events on Class[Rabbitmq::Service] �[mNotice: /Stage[main]/Rabbitmq::Management/Rabbitmq_user[guest]: Dependency Service[rabbitmq-server] has failures: true Warning: /Stage[main]/Rabbitmq::Management/Rabbitmq_user[guest]: Skipping because of failed dependencies Info: Class[Rabbitmq]: Unscheduling all events on Class[Rabbitmq] Warning: /Stage[main]/Rabbitmq::Install::Rabbitmqadmin/Package[python]: Skipping because of failed dependencies Warning: /Stage[main]/Rabbitmq::Install::Rabbitmqadmin/Exec[remove_old_rabbitmqadmin_on_upgrade]: Skipping because of failed dependencies Warning: /Stage[main]/Rabbitmq::Install::Rabbitmqadmin/Archive[rabbitmqadmin]: Skipping because of failed dependencies Info: Stage[main]: Unscheduling all events on Stage[main] Warning: /Stage[main]/Rabbitmq::Install::Rabbitmqadmin/File[/usr/local/bin/rabbitmqadmin]: Skipping because of failed dependencies �[mNotice: Applied catalog in 55.78 seconds

Check failure on line 7 in spec/acceptance/delete_guest_user_spec.rb

View workflow job for this annotation

GitHub Actions / Puppet / 7 - Ubuntu 18.04

rabbitmq with delete_guest_user delete_guest_user runs successfully Failure/Error: apply_manifest(pp, catch_failures: true) Beaker::Host::CommandFailure: Host 'ubuntu1804-64-puppet7.example.com' exited with 6 running: puppet apply --verbose --detailed-exitcodes /tmp/apply_manifest_112603577.pp.3lfX3H Last 10 lines of output were: Info: Class[Rabbitmq::Service]: Unscheduling all events on Class[Rabbitmq::Service] �[mNotice: /Stage[main]/Rabbitmq::Management/Rabbitmq_user[guest]: Dependency Service[rabbitmq-server] has failures: true Warning: /Stage[main]/Rabbitmq::Management/Rabbitmq_user[guest]: Skipping because of failed dependencies Info: Class[Rabbitmq]: Unscheduling all events on Class[Rabbitmq] Warning: /Stage[main]/Rabbitmq::Install::Rabbitmqadmin/Package[python]: Skipping because of failed dependencies Warning: /Stage[main]/Rabbitmq::Install::Rabbitmqadmin/Exec[remove_old_rabbitmqadmin_on_upgrade]: Skipping because of failed dependencies Warning: /Stage[main]/Rabbitmq::Install::Rabbitmqadmin/Archive[rabbitmqadmin]: Skipping because of failed dependencies Warning: /Stage[main]/Rabbitmq::Install::Rabbitmqadmin/File[/usr/local/bin/rabbitmqadmin]: Skipping because of failed dependencies Info: Stage[main]: Unscheduling all events on Stage[main] �[mNotice: Applied catalog in 55.16 seconds
pp = <<-EOS
class { 'erlang': repo_source => 'packagecloud' } ->
class { 'erlang': } ->
class { 'rabbitmq':
port => 5672,
delete_guest_user => true,
Expand Down
2 changes: 1 addition & 1 deletion spec/acceptance/parameter_spec.rb
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
context 'create parameter resource' do
it 'runs successfully' do
pp = <<-EOS
class { 'erlang': repo_source => 'packagecloud' } ->
class { 'erlang': } ->
class { 'rabbitmq':
service_manage => true,
port => 5672,
Expand Down
2 changes: 1 addition & 1 deletion spec/acceptance/policy_spec.rb
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
context 'create policy resource' do
it 'runs successfully' do
pp = <<-EOS
class { 'erlang': repo_source => 'packagecloud' } ->
class { 'erlang': } ->
class { 'rabbitmq':
service_manage => true,
port => 5672,
Expand Down
6 changes: 3 additions & 3 deletions spec/acceptance/queue_spec.rb
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
context 'create binding and queue resources when using default management port' do
it 'runs successfully' do
pp = <<-EOS
class { 'erlang': repo_source => 'packagecloud' } ->
class { 'erlang': } ->
class { 'rabbitmq':
service_manage => true,
port => 5672,
Expand Down Expand Up @@ -77,7 +77,7 @@ class { 'rabbitmq':
context 'create multiple bindings when same source / destination / vhost but different routing keys' do
it 'runs successfully' do
pp = <<-EOS
class { 'erlang': repo_source => 'packagecloud' } ->
class { 'erlang': } ->
class { 'rabbitmq':
service_manage => true,
port => 5672,
Expand Down Expand Up @@ -162,7 +162,7 @@ class { 'rabbitmq':
context 'create binding and queue resources when using a non-default management port' do
it 'runs successfully' do
pp = <<-EOS
class { 'erlang': repo_source => 'packagecloud' } ->
class { 'erlang': } ->
class { 'rabbitmq':
service_manage => true,
port => 5672,
Expand Down
8 changes: 4 additions & 4 deletions spec/acceptance/rabbitmqadmin_spec.rb
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
context 'downloads the cli tools' do
it 'runs successfully' do
pp = <<-EOS
class { 'erlang': repo_source => 'packagecloud' } ->
class { 'erlang': } ->
class { 'rabbitmq':
admin_enable => true,
service_manage => true,
Expand All @@ -24,7 +24,7 @@ class { 'rabbitmq':
context 'does nothing if service is unmanaged' do
it 'runs successfully' do
pp = <<-EOS
class { 'erlang': repo_source => 'packagecloud' } ->
class { 'erlang': } ->
class { 'rabbitmq':
admin_enable => true,
service_manage => false,
Expand All @@ -44,7 +44,7 @@ class { 'rabbitmq':
it 'runs successfully' do
# make sure credential change takes effect before admin_enable
pp_pre = <<-EOS
class { 'erlang': repo_source => 'packagecloud' } ->
class { 'erlang': } ->
class { 'rabbitmq':
service_manage => true,
default_user => 'foobar',
Expand All @@ -53,7 +53,7 @@ class { 'rabbitmq':
EOS

pp = <<-EOS
class { 'erlang': repo_source => 'packagecloud' } ->
class { 'erlang': } ->
class { 'rabbitmq':
admin_enable => true,
service_manage => true,
Expand Down
2 changes: 1 addition & 1 deletion spec/acceptance/user_spec.rb
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
context 'create user resource' do
it 'runs successfully' do
pp = <<-EOS
class { 'erlang': repo_source => 'packagecloud' } ->
class { 'erlang': } ->
class { 'rabbitmq':
service_manage => true,
port => 5672,
Expand Down
2 changes: 1 addition & 1 deletion spec/acceptance/vhost_spec.rb
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
context 'create vhost resource' do
it 'runs successfully' do
pp = <<-EOS
class { 'erlang': repo_source => 'packagecloud' } ->
class { 'erlang': } ->
class { 'rabbitmq':
service_manage => true,
port => 5672,
Expand Down
3 changes: 2 additions & 1 deletion spec/classes/rabbitmq_spec.rb
Original file line number Diff line number Diff line change
Expand Up @@ -234,7 +234,8 @@
is_expected.to contain_archive('rabbitmqadmin').with_source('http://1.1.1.1:15672/cli/rabbitmqadmin')
end

it { is_expected.to contain_package('python') } if %w[RedHat Debian SUSE Archlinux].include?(os_facts[:os]['family'])
it { is_expected.to contain_package('python') } if %w[Debian SUSE Archlinux].include?(os_facts[:os]['family'])
it { is_expected.to contain_package('python3') } if %w[RedHat].include?(os_facts[:os]['family'])
it { is_expected.to contain_package('python38') } if %w[FreeBSD].include?(os_facts[:os]['family'])
end

Expand Down
4 changes: 1 addition & 3 deletions spec/spec_helper_acceptance.rb
Original file line number Diff line number Diff line change
Expand Up @@ -3,11 +3,9 @@
require 'voxpupuli/acceptance/spec_helper_acceptance'

configure_beaker do |host|
install_module_from_forge_on(host, 'puppet-erlang', '>= 1.0.0 < 2.0.0')
install_module_from_forge_on(host, 'puppet-erlang', '>= 1.1.0 < 2.0.0')

case fact_on(host, 'os.family')
when 'Debian'
install_module_from_forge_on(host, 'puppetlabs-apt', '>= 4.1.0 < 9.0.0')
when 'RedHat'
if fact_on(host, 'os.selinux.enabled')
# Make sure selinux is disabled so the tests work.
Expand Down

0 comments on commit 15e539d

Please sign in to comment.