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:
2
2
repositories :
3
3
stdlib : https://github.com/puppetlabs/puppetlabs-stdlib.git
4
4
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"
6
8
yumrepo_core : https://github.com/puppetlabs/puppetlabs-yumrepo_core.git
7
9
facts : https://github.com/puppetlabs/puppetlabs-facts.git
Original file line number Diff line number Diff line change 93
93
# any other type of source means we use a package manager (yum) with no 'source' parameter in the
94
94
# package resource below
95
95
$_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
+ }
97
101
$_source = undef
98
102
}
99
103
}
Original file line number Diff line number Diff line change @@ -119,6 +119,26 @@ def global_facts(facts, os)
119
119
end
120
120
end
121
121
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
+
122
142
context 'supported_operating systems' do
123
143
on_supported_os . each do |os , facts |
124
144
context "on #{ os } " do
You can’t perform that action at this time.
0 commit comments