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

Disallow empty string in package_apt_pin #1025

Merged
merged 2 commits into from
Nov 15, 2024
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.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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
Loading