-
-
Notifications
You must be signed in to change notification settings - Fork 376
Expand file tree
/
Copy pathvenv_spec.rb
More file actions
37 lines (32 loc) · 973 Bytes
/
venv_spec.rb
File metadata and controls
37 lines (32 loc) · 973 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
# frozen_string_literal: true
require 'spec_helper'
describe 'python::install::venv' do
on_supported_os.each do |os, facts|
context "on #{os}" do
let :facts do
facts
end
context 'with default settings' do
if %w[Archlinux RedHat FreeBSD].include?(facts[:os]['family'])
it { is_expected.not_to contain_package('python-venv') }
else
it { is_expected.to contain_package('python-venv').with(ensure: 'absent') }
end
end
context 'when ensuring venv is setup' do
let(:pre_condition) do
<<~PP
class { 'python':
venv => present,
}
PP
end
if %w[Archlinux FreeBSD RedHat].include?(facts[:os]['family'])
it { is_expected.not_to contain_package('python-venv') }
else
it { is_expected.to contain_package('python-venv').with(ensure: 'present') }
end
end
end
end
end