Skip to content

Commit 459e30e

Browse files
committed
Run gunicorn specs for all supported os
1 parent ac5fd04 commit 459e30e

File tree

1 file changed

+16
-25
lines changed

1 file changed

+16
-25
lines changed

spec/defines/gunicorn_spec.rb

Lines changed: 16 additions & 25 deletions
Original file line numberDiff line numberDiff line change
@@ -5,37 +5,28 @@
55
describe 'python::gunicorn', type: :define do
66
let(:title) { 'test-app' }
77

8-
context 'on Debian OS' do
9-
let :facts do
10-
{
11-
id: 'root',
12-
kernel: 'Linux',
13-
lsbdistcodename: 'squeeze',
14-
osfamily: 'Debian',
15-
operatingsystem: 'Debian',
16-
operatingsystemrelease: '6',
17-
path: '/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin',
18-
concat_basedir: '/dne'
19-
}
20-
end
8+
on_supported_os.each do |os, facts|
9+
context "on #{os}" do
10+
let(:facts) { facts }
2111

22-
describe 'test-app with default parameter values' do
23-
context 'configures test app with default parameter values' do
24-
let(:params) { { dir: '/srv/testapp' } }
12+
describe 'test-app with default parameter values' do
13+
context 'configures test app with default parameter values' do
14+
let(:params) { { dir: '/srv/testapp' } }
2515

26-
it { is_expected.to contain_file('/etc/gunicorn.d/test-app').with_mode('0644').with_content(%r{--log-level=error}) }
27-
end
16+
it { is_expected.to contain_file('/etc/gunicorn.d/test-app').with_mode('0644').with_content(%r{--log-level=error}) }
17+
end
2818

29-
context 'test-app with custom log level' do
30-
let(:params) { { dir: '/srv/testapp', log_level: 'info' } }
19+
context 'test-app with custom log level' do
20+
let(:params) { { dir: '/srv/testapp', log_level: 'info' } }
3121

32-
it { is_expected.to contain_file('/etc/gunicorn.d/test-app').with_mode('0644').with_content(%r{--log-level=info}) }
33-
end
22+
it { is_expected.to contain_file('/etc/gunicorn.d/test-app').with_mode('0644').with_content(%r{--log-level=info}) }
23+
end
3424

35-
context 'test-app with custom gunicorn preload arguments' do
36-
let(:params) { { dir: '/srv/testapp', args: ['--preload'] } }
25+
context 'test-app with custom gunicorn preload arguments' do
26+
let(:params) { { dir: '/srv/testapp', args: ['--preload'] } }
3727

38-
it { is_expected.to contain_file('/etc/gunicorn.d/test-app').with_mode('0644').with_content(%r{--preload}) }
28+
it { is_expected.to contain_file('/etc/gunicorn.d/test-app').with_mode('0644').with_content(%r{--preload}) }
29+
end
3930
end
4031
end
4132
end

0 commit comments

Comments
 (0)