|
22 | 22 | end |
23 | 23 |
|
24 | 24 | [ |
25 | | - ['Rocky', 'el/8', 8], |
26 | | - ['AlmaLinux', 'el/8', 8], |
27 | | - ['AlmaLinux', 'el/9', 9], |
28 | | - ['Fedora', 'fedora/f36', 36], |
29 | | - ['CentOS', 'el/7', 7], |
30 | | - ['Amazon', 'el/6', 2017], |
31 | | - ['Amazon', 'el/6', 2018], |
32 | | - ['Amazon', 'amazon/2', 2], |
33 | | - ['Amazon', 'amazon/2023', 2023], |
34 | | - ].each do |os, urlbit, osmajor| |
| 25 | + ['Rocky', 'el/8', '8', 'x86_64'], |
| 26 | + ['AlmaLinux', 'el/8', '8', 'x86_64'], |
| 27 | + ['AlmaLinux', 'el/9', '9', 'x86_64'], |
| 28 | + ['Fedora', 'fedora/f36', '36', 'x86_64'], |
| 29 | + ['CentOS', 'el/7', '7', 'x86_64'], |
| 30 | + ['Amazon', 'el/6', '2017', 'x86_64'], |
| 31 | + ['Amazon', 'el/6', '2018', 'x86_64'], |
| 32 | + ['Amazon', 'el/7', '2', 'x86_64'], |
| 33 | + ['Amazon', 'amazon/2', '2', 'aarch64'], |
| 34 | + ['Amazon', 'amazon/2023', '2023', 'x86_64'], |
| 35 | + ['Amazon', 'amazon/2023', '2023', 'aarch64'], |
| 36 | + ].each do |os, urlbit, osmajor, arch| |
35 | 37 | context "with #{os} and #{urlbit}" do |
36 | 38 | let(:facts) do |
37 | | - override_facts(super(), os: { name: os, release: { major: osmajor, }, }) |
| 39 | + override_facts(super(), os: { name: os, release: { major: osmajor }, architecture: arch }) |
38 | 40 | end |
39 | 41 |
|
40 | 42 | script = <<-SCRIPT |
|
148 | 150 | is_expected.to contain_yumrepo('pc_repo') |
149 | 151 | .with({ |
150 | 152 | # We no longer expect the 'f' in fedora repos |
151 | | - 'baseurl' => "http://yum.puppet.com/puppet5/#{urlbit.gsub('/f', '/')}/x64", |
| 153 | + 'baseurl' => "http://yum.puppet.com/puppet5/#{urlbit.gsub('/f', '/')}/#{arch}", |
152 | 154 | 'enabled' => 'true', |
153 | 155 | 'gpgcheck' => '1', |
154 | 156 | 'gpgkey' => "file:///etc/pki/rpm-gpg/RPM-GPG-KEY-puppet\n file:///etc/pki/rpm-gpg/RPM-GPG-KEY-puppet-20250406", |
|
165 | 167 | } |
166 | 168 | end |
167 | 169 |
|
168 | | - it { is_expected.to contain_yumrepo('pc_repo').with_baseurl("http://fake-yum.com/puppet5/#{urlbit.gsub('/f', '/')}/x64") } |
| 170 | + it { is_expected.to contain_yumrepo('pc_repo').with_baseurl("http://fake-yum.com/puppet5/#{urlbit.gsub('/f', '/')}/#{arch}") } |
169 | 171 | end |
170 | 172 | end |
171 | 173 | end |
172 | 174 |
|
173 | | - [['RedHat', 'el-7-x86_64', 'el-7-x86_64', 7], ['RedHat', 'el-8-x86_64', 'el-8-x86_64', 8], ['Amazon', '', 'el-6-x64', 6]].each do |os, tag, repodir, osmajor| |
| 175 | + [['RedHat', 'el-7-x86_64', 'el-7-x86_64', '7'], ['RedHat', 'el-8-x86_64', 'el-8-x86_64', '8'], ['Amazon', '', 'el-6-x64', '6']].each do |os, tag, repodir, osmajor| |
174 | 176 | context "when PE on #{os}" do |
175 | 177 | before(:each) do |
176 | 178 | # Need to mock the PE functions |
|
0 commit comments