|
5 | 5 | describe 'python::gunicorn', type: :define do |
6 | 6 | let(:title) { 'test-app' } |
7 | 7 |
|
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 } |
21 | 11 |
|
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' } } |
25 | 15 |
|
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 |
28 | 18 |
|
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' } } |
31 | 21 |
|
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 |
34 | 24 |
|
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'] } } |
37 | 27 |
|
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 |
39 | 30 | end |
40 | 31 | end |
41 | 32 | end |
|
0 commit comments