File tree Expand file tree Collapse file tree 3 files changed +28
-2
lines changed Expand file tree Collapse file tree 3 files changed +28
-2
lines changed Original file line number Diff line number Diff line change @@ -2,6 +2,8 @@ fixtures:
22 repositories :
33 stdlib : https://github.com/puppetlabs/puppetlabs-stdlib.git
44 apt : https://github.com/puppetlabs/puppetlabs-apt.git
5- inifile : https://github.com/puppetlabs/puppetlabs-inifile.git
5+ inifile :
6+ repo : https://github.com/puppetlabs/puppetlabs-inifile.git
7+ ref : " v6.2.0"
68 yumrepo_core : https://github.com/puppetlabs/puppetlabs-yumrepo_core.git
79 facts : https://github.com/puppetlabs/puppetlabs-facts.git
Original file line number Diff line number Diff line change 9393 # any other type of source means we use a package manager (yum) with no 'source' parameter in the
9494 # package resource below
9595 $_package_version = $package_version
96- $_provider = ' yum'
96+ if $facts [' os' ][' name' ] == ' Fedora' and versioncmp($facts [' os' ][' release' ][' major' ], ' 41' ) {
97+ $_provider = undef
98+ } else {
99+ $_provider = ' yum'
100+ }
97101 $_source = undef
98102 }
99103 }
Original file line number Diff line number Diff line change @@ -119,6 +119,26 @@ def global_facts(facts, os)
119119 end
120120 end
121121
122+ context 'package provider' do
123+ # module is still pinned to older rspec-puppet and facterdb
124+ os_name = 'fedora-41-x86_64'
125+ os_facts = {
126+ os_name => on_supported_os [ 'fedora-39-x86_64' ] ,
127+ }
128+ os_facts . values . first [ :os ] [ 'release' ] = { 'full' => '41' , 'major' => '41' }
129+ os_facts . each do |os , facts |
130+ context "on #{ os } " do
131+ let ( :facts ) do
132+ global_facts ( facts , os )
133+ end
134+
135+ let ( :params ) { { package_version : '6.18.0' } }
136+
137+ it { is_expected . to contain_package ( 'puppet-agent' ) . with_provider ( nil ) }
138+ end
139+ end
140+ end
141+
122142 context 'supported_operating systems' do
123143 on_supported_os . each do |os , facts |
124144 context "on #{ os } " do
You can’t perform that action at this time.
0 commit comments