forked from voxpupuli/puppet-python
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathrequirements_spec.rb
More file actions
49 lines (40 loc) · 1.17 KB
/
requirements_spec.rb
File metadata and controls
49 lines (40 loc) · 1.17 KB
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
38
39
40
41
42
43
44
45
46
47
48
49
require 'spec_helper'
describe 'python::requirements', type: :define do
on_supported_os.each do |os, facts|
next if os == 'gentoo-3-x86_64'
context "on #{os}" do
let :facts do
facts
end
let :title do
'/requirements.txt'
end
context 'with /requirements.txt' do
let :params do
{
requirements: '/requirements.txt'
}
end
it { is_expected.to contain_file('/requirements.txt').with_mode('0644') }
context 'with manage_requirements => false' do
let(:params) { super().merge(manage_requirements: false) }
it { is_expected.not_to contain_file('/requirements.txt') }
end
end
describe 'with owner' do
context 'bob:bob' do
let :params do
{
owner: 'bob',
group: 'bob'
}
end
it { is_expected.to compile.and_raise_error(%r{root user must be used when virtualenv is system}) }
end
end
context 'default' do
it { is_expected.to contain_file('/requirements.txt').with_owner('root').with_group('root') }
end
end
end
end