Skip to content

Commit

Permalink
Fix apt pin for new version of apt module
Browse files Browse the repository at this point in the history
* Require package_apt_pin to be a non-empty string or number
* Use `nil` instead of empty string in test for empty pin
  • Loading branch information
wyardley committed Nov 14, 2024
1 parent 97d0870 commit 1f583ce
Show file tree
Hide file tree
Showing 3 changed files with 3 additions and 3 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
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 1f583ce

Please sign in to comment.