|
265 | 265 | end |
266 | 266 | when 'RedHat', 'CentOS' |
267 | 267 | case facts[:os]['release']['major'] |
268 | | - when '7' |
269 | | - |
270 | | - context 'on a Redhat 7 OS' do |
271 | | - it { is_expected.to contain_class('python::install') } |
272 | | - it { is_expected.to contain_package('pip').with_name('python2-pip') } |
273 | | - |
274 | | - describe 'with python::version' do |
275 | | - context 'python36' do |
276 | | - let(:params) { { version: 'python36' } } |
277 | | - |
278 | | - it { is_expected.to compile.with_all_deps } |
279 | | - it { is_expected.to contain_package('pip').with_name('python36-pip') } |
280 | | - it { is_expected.to contain_package('python').with_name('python36') } |
281 | | - it { is_expected.to contain_package('python-dev').with_name('python36-devel') } |
282 | | - end |
283 | | - end |
284 | | - |
285 | | - describe 'with manage_gunicorn' do |
286 | | - context 'true' do |
287 | | - let(:params) { { manage_gunicorn: true } } |
288 | | - |
289 | | - it { is_expected.to contain_package('gunicorn').with_name('python-gunicorn') } |
290 | | - end |
291 | | - |
292 | | - context 'empty args' do |
293 | | - # let(:params) {{ :manage_gunicorn => '' }} |
294 | | - it { is_expected.to contain_package('gunicorn').with_name('python-gunicorn') } |
295 | | - end |
296 | | - |
297 | | - context 'false' do |
298 | | - let(:params) { { manage_gunicorn: false } } |
299 | | - |
300 | | - it { is_expected.not_to contain_package('gunicorn') } |
301 | | - end |
302 | | - end |
303 | | - |
304 | | - describe 'with python::provider' do |
305 | | - context 'scl' do |
306 | | - describe 'with version' do |
307 | | - context '3.6 SCL meta package' do |
308 | | - let(:params) { { version: 'rh-python36' } } |
309 | | - |
310 | | - it { is_expected.to compile.with_all_deps } |
311 | | - end |
312 | | - |
313 | | - context '3.6 SCL python package' do |
314 | | - let(:params) { { version: 'rh-python36-python' } } |
315 | | - |
316 | | - it { is_expected.to compile.with_all_deps } |
317 | | - end |
318 | | - end |
319 | | - |
320 | | - describe 'with manage_scl' do |
321 | | - context 'true' do |
322 | | - let(:params) { { provider: 'scl', manage_scl: true } } |
323 | | - |
324 | | - it { is_expected.to contain_package('centos-release-scl') } |
325 | | - it { is_expected.to contain_package('scl-utils') } |
326 | | - end |
327 | | - |
328 | | - context 'false' do |
329 | | - let(:params) { { provider: 'scl', manage_scl: false } } |
330 | | - |
331 | | - it { is_expected.not_to contain_package('centos-release-scl') } |
332 | | - it { is_expected.not_to contain_package('scl-utils') } |
333 | | - end |
334 | | - end |
335 | | - end |
336 | | - end |
337 | | - end |
338 | 268 | when '8' |
339 | 269 | context 'on a Redhat 8 OS' do |
340 | 270 | it { is_expected.to contain_class('python::install') } |
|
0 commit comments