forked from rvdh/puppet-uwsgi
-
Notifications
You must be signed in to change notification settings - Fork 3
Expand file tree
/
Copy pathapp_spec.rb
More file actions
60 lines (57 loc) · 1.55 KB
/
app_spec.rb
File metadata and controls
60 lines (57 loc) · 1.55 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
50
51
52
53
54
55
56
57
58
59
60
require 'spec_helper'
describe 'uwsgi::app' do
on_supported_os.each do |os, facts|
context "on #{os}" do
let(:facts) do
facts
end
let(:hiera_config) { 'hiera.yaml' }
let(:title) { 'test' }
let(:params) do
{
'uid' => 'test',
'gid' => 'test'
}
end
context 'with parameters uid and gid' do
it { is_expected.to compile.with_all_deps }
it { is_expected.to contain_class('uwsgi') }
case facts[:osfamily]
when 'Debian'
case facts[:operatingsystemmajrelease]
when '7', '14.04'
it do
is_expected.to contain_file('/etc/uwsgi/apps-enabled/test.ini').
with(
'ensure' => 'present',
'owner' => 'test',
'group' => 'test',
'mode' => '0640'
)
end
else
it do
is_expected.to contain_file('/etc/uwsgi-emperor/vassals/test.ini').
with(
'ensure' => 'present',
'owner' => 'test',
'group' => 'test',
'mode' => '0640'
)
end
end
when 'RedHat'
it do
is_expected.to contain_file('/etc/uwsgi.d/test.ini').
with(
'ensure' => 'present',
'owner' => 'test',
'group' => 'test',
'mode' => '0640'
)
end
end
end
end
end
end