|
43 | 43 | end |
44 | 44 | describe file('/etc/yum/pluginconf.d/versionlock.list') do |
45 | 45 | it { is_expected.to be_file } |
46 | | - if %w[6 7].include?(fact('os.release.major')) |
| 46 | + if %w[7].include?(fact('os.release.major')) |
47 | 47 | it { is_expected.to contain '0:bash-4.1.2-9.el6_2.*' } |
48 | 48 | it { is_expected.to contain '0:tcsh-3.1.2-9.el6_2.*' } |
49 | 49 | it { is_expected.to contain '2:netscape-8.1.2-9.el6_2.*' } |
|
53 | 53 | it { is_expected.to contain 'netscape-2:8.1.2-9.el6_2.*' } |
54 | 54 | end |
55 | 55 | end |
| 56 | + if fact('os.release.major') == '8' |
| 57 | + describe package('python3-dnf-plugin-versionlock') do |
| 58 | + it { is_expected.to be_installed } |
| 59 | + end |
| 60 | + else |
| 61 | + describe package('yum-plugin-versionlock') do |
| 62 | + it { is_expected.to be_installed } |
| 63 | + end |
| 64 | + end |
56 | 65 | end |
57 | 66 | it 'must work if clean is specified' do |
58 | 67 | shell('yum repolist', acceptable_exit_codes: [0]) |
|
76 | 85 | # Run it twice and test for idempotency |
77 | 86 | apply_manifest(pp, catch_failures: true) |
78 | 87 | apply_manifest(pp, catch_changes: true) |
| 88 | + |
79 | 89 | # Check the cache is really empty. |
80 | 90 | # all repos will have 0 packages. |
81 | 91 | # bit confused by the motivation of the first test? |
82 | | - if %w[6 7].include?(fact('os.release.major')) |
| 92 | + if fact('os.release.major') == '7' |
83 | 93 | shell('yum -C repolist -d0 | grep -v "repo id" | awk "{print $NF}" FS= | grep -v 0', acceptable_exit_codes: [1]) |
84 | 94 | shell('yum -q list available samba-devel', acceptable_exit_codes: [1]) |
85 | 95 | else |
|
0 commit comments