|
20 | 20 | operatingsystem: 'Debian',
|
21 | 21 | operatingsystemrelease: '6',
|
22 | 22 | path: '/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin',
|
23 |
| - concat_basedir: '/dne' |
| 23 | + concat_basedir: '/dne', |
| 24 | + pip_version: '18.1' |
24 | 25 | }
|
25 | 26 | end
|
26 | 27 |
|
|
126 | 127 | end
|
127 | 128 |
|
128 | 129 | describe 'install latest' do
|
| 130 | + context 'does not use legacy resolver in unless' do |
| 131 | + let(:params) { { ensure: 'latest' } } |
| 132 | + |
| 133 | + it { is_expected.not_to contain_exec('pip_install_rpyc').with_unless(%r{--use-deprecated=legacy-resolver}) } |
| 134 | + end |
| 135 | + |
129 | 136 | context 'does not use pip search in unless' do
|
130 | 137 | let(:params) { { ensure: 'latest' } }
|
131 | 138 |
|
|
158 | 165 | end
|
159 | 166 | end
|
160 | 167 | end
|
| 168 | + |
| 169 | + context 'on Debian OS with pip_version 20.3.4' do |
| 170 | + let :facts do |
| 171 | + { |
| 172 | + id: 'root', |
| 173 | + kernel: 'Linux', |
| 174 | + lsbdistcodename: 'buster', |
| 175 | + os: { |
| 176 | + family: 'Debian', |
| 177 | + release: { major: '10' }, |
| 178 | + }, |
| 179 | + osfamily: 'Debian', |
| 180 | + operatingsystem: 'Debian', |
| 181 | + operatingsystemrelease: '10.12', |
| 182 | + path: '/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin', |
| 183 | + concat_basedir: '/dne', |
| 184 | + pip_version: '20.3.4' |
| 185 | + } |
| 186 | + end |
| 187 | + |
| 188 | + describe 'install latest' do |
| 189 | + context 'with legacy resolver in unless cmd' do |
| 190 | + let(:params) { { ensure: 'latest' } } |
| 191 | + |
| 192 | + it { is_expected.to compile.with_all_deps } |
| 193 | + it { is_expected.to contain_exec('pip_install_rpyc').with_unless(%r{--use-deprecated=legacy-resolver}) } |
| 194 | + end |
| 195 | + end |
| 196 | + end |
161 | 197 | end
|
162 | 198 |
|
163 | 199 | describe 'python::pip', type: :define do
|
|
0 commit comments