|
17 | 17 | it { is_expected.to contain_class('python::config') }
|
18 | 18 | it { is_expected.to contain_package('python') }
|
19 | 19 |
|
20 |
| - if facts[:os]['family'] == 'Archlinux' |
21 |
| - it { is_expected.not_to contain_package('pip') } |
| 20 | + if %w[Archlinux].include?(facts[:os]['family']) |
| 21 | + it { is_expected.not_to contain_class('python::install::pip') } |
22 | 22 | else
|
23 |
| - it { is_expected.to contain_package('pip') } |
| 23 | + it { is_expected.to contain_class('python::install::pip') } |
24 | 24 | end
|
25 | 25 |
|
26 | 26 | if %w[Archlinux FreeBSD RedHat].include?(facts[:os]['family'])
|
|
43 | 43 | it { is_expected.to compile.with_all_deps }
|
44 | 44 | it { is_expected.not_to contain_package('python') }
|
45 | 45 | it { is_expected.not_to contain_package('python-dev') }
|
46 |
| - it { is_expected.not_to contain_package('pip') } |
| 46 | + it { is_expected.not_to contain_class('python::install::pip') } |
47 | 47 | it { is_expected.not_to contain_class('python::install::venv') }
|
48 | 48 | end
|
49 | 49 |
|
50 |
| - context 'with packages present' do |
51 |
| - let :params do |
52 |
| - { |
53 |
| - manage_pip_package: true, |
54 |
| - pip: 'present', |
55 |
| - } |
56 |
| - end |
57 |
| - |
58 |
| - it { is_expected.to compile.with_all_deps } |
59 |
| - it { is_expected.to contain_package('pip').with(ensure: 'present') } |
60 |
| - end |
61 |
| - |
62 | 50 | case facts[:os]['family']
|
63 | 51 | when 'Debian'
|
64 | 52 |
|
|
68 | 56 | # Base debian packages.
|
69 | 57 | it { is_expected.to contain_package('python') }
|
70 | 58 | it { is_expected.to contain_package('python-dev') }
|
71 |
| - it { is_expected.to contain_package('pip') } |
| 59 | + it { is_expected.to contain_class('python::install::pip') } |
72 | 60 |
|
73 | 61 | describe 'with python::version' do
|
74 | 62 | context 'python3.7' do
|
|
0 commit comments