Skip to content

Commit

Permalink
Merge pull request #1025 from wyardley/wyardley/fix_test
Browse files Browse the repository at this point in the history
Disallow empty string in `package_apt_pin`
  • Loading branch information
wyardley authored Nov 15, 2024
2 parents 97d0870 + 2a742df commit c5afc5f
Show file tree
Hide file tree
Showing 4 changed files with 8 additions and 4 deletions.
2 changes: 1 addition & 1 deletion REFERENCE.md
Original file line number Diff line number Diff line change
Expand Up @@ -725,7 +725,7 @@ Default value: `undef`

##### <a name="-rabbitmq--package_apt_pin"></a>`package_apt_pin`

Data type: `Optional[Variant[Numeric, String]]`
Data type: `Optional[Variant[Numeric, String[1]]]`

Whether to pin the package to a particular source

Expand Down
2 changes: 1 addition & 1 deletion manifests/init.pp
Original file line number Diff line number Diff line change
Expand Up @@ -378,7 +378,7 @@
Boolean $management_ssl = true,
Optional[String] $management_hostname = undef,
Optional[String] $node_ip_address = undef,
Optional[Variant[Numeric, String]] $package_apt_pin = undef,
Optional[Variant[Numeric, String[1]]] $package_apt_pin = undef,
String $package_ensure = 'installed',
Optional[String] $package_gpg_key = undef,
Optional[String] $repo_gpg_key = undef,
Expand Down
6 changes: 5 additions & 1 deletion spec/acceptance/clustering_spec.rb
Original file line number Diff line number Diff line change
Expand Up @@ -68,6 +68,10 @@ class { 'rabbitmq':
context 'rabbitmq::cluster[:local_node] = foobar' do
it 'runs successfully' do
pp = <<-EOS
# Needed to avoid nxdomain error
host { 'foobar':
ip => '127.0.0.1',
}
class { 'rabbitmq':
cluster => { 'name' => 'rabbit_cluster', 'init_node' => 'foobar', 'local_node' => 'foobar' },
config_cluster => true,
Expand All @@ -78,7 +82,7 @@ class { 'rabbitmq':
}
EOS

apply_manifest(pp, expect_failures: true)
apply_manifest(pp, catch_failures: true)
end
end
end
2 changes: 1 addition & 1 deletion spec/classes/rabbitmq_spec.rb
Original file line number Diff line number Diff line change
Expand Up @@ -83,7 +83,7 @@
end

context 'with no pin', if: os_facts['os']['family'] == 'Debian' do
let(:params) { { repos_ensure: true, package_apt_pin: '' } }
let(:params) { { repos_ensure: true, package_apt_pin: nil } }

describe 'it sets up an apt::source' do
it {
Expand Down

0 comments on commit c5afc5f

Please sign in to comment.