|
16 | 16 | '---', |
17 | 17 | ':enabled: https', |
18 | 18 | ':database: ', |
19 | | - ':core_url: https://foo.example.com:8008', |
20 | | - ':external_core: false', |
| 19 | + ':console_auth: true', |
21 | 20 | ] |
22 | 21 | verify_exact_contents(catalogue, |
23 | 22 | "#{etc_dir}/foreman-proxy/settings.d/dynflow.yml", |
24 | 23 | lines) |
25 | 24 | end |
26 | 25 |
|
27 | | - it { should contain_foreman_proxy__plugin('dynflow_core') } |
28 | | - it { should contain_service('smart_proxy_dynflow_core'). |
29 | | - with(ensure: false, enable: false) } |
30 | 26 | it { should contain_systemd__service_limits('foreman-proxy.service') } |
31 | | - |
32 | | - it { should_not contain_file("#{etc_dir}/smart_proxy_dynflow_core/settings.d") } |
33 | | - it { should_not contain_file("#{etc_dir}/smart_proxy_dynflow_core/settings.yml") } |
34 | | - it { should_not contain_systemd__service_limits('smart_proxy_dynflow_core.service') } |
35 | 27 | end |
36 | 28 |
|
37 | 29 | describe 'with custom settings' do |
|
40 | 32 | :ssl_disabled_ciphers => ['NULL-MD5', 'NULL-SHA'], |
41 | 33 | :tls_disabled_versions => ['1.1'], |
42 | 34 | :open_file_limit => 8000, |
43 | | - :external_core => true, |
44 | 35 | } end |
45 | 36 |
|
46 | 37 | it { should compile.with_all_deps } |
47 | 38 | it { should contain_foreman_proxy__plugin__module('dynflow') } |
48 | 39 |
|
49 | | - it 'should create settings.d symlink' do |
50 | | - should contain_file("#{etc_dir}/smart_proxy_dynflow_core/settings.d"). |
51 | | - with_ensure('link').with_target("#{etc_dir}/foreman-proxy/settings.d") |
52 | | - end |
53 | | - |
54 | | - it 'should create systemd service limits' do |
55 | | - should contain_systemd__service_limits('smart_proxy_dynflow_core.service'). |
56 | | - with_limits({'LimitNOFILE' => 8000}).that_notifies('Service[smart_proxy_dynflow_core]') |
57 | | - end |
58 | | - |
59 | | - it 'should generate correct dynflow core settings.yml' do |
60 | | - verify_exact_contents(catalogue, "#{etc_dir}/smart_proxy_dynflow_core/settings.yml", [ |
61 | | - '---', |
62 | | - ':database: /var/lib/foreman-proxy/dynflow/dynflow.sqlite', |
63 | | - ':console_auth: true', |
64 | | - ':foreman_url: https://foo.example.com', |
65 | | - ':listen: "*"', |
66 | | - ':port: 8008', |
67 | | - ':use_https: true', |
68 | | - ':ssl_ca_file: /etc/puppetlabs/puppet/ssl/certs/ca.pem', |
69 | | - ':ssl_certificate: /etc/puppetlabs/puppet/ssl/certs/foo.example.com.pem', |
70 | | - ':ssl_private_key: /etc/puppetlabs/puppet/ssl/private_keys/foo.example.com.pem', |
71 | | - ':ssl_disabled_ciphers: ["NULL-MD5", "NULL-SHA"]', |
72 | | - ':tls_disabled_versions: ["1.1"]', |
73 | | - ]) |
74 | | - end |
75 | | - |
76 | 40 | it 'should generate correct dynflow.yml' do |
77 | 41 | verify_exact_contents(catalogue, "#{etc_dir}/foreman-proxy/settings.d/dynflow.yml", [ |
78 | 42 | '---', |
79 | 43 | ':enabled: https', |
80 | 44 | ':database: /var/lib/foreman-proxy/dynflow/dynflow.sqlite', |
81 | | - ':core_url: https://foo.example.com:8008', |
82 | | - ':external_core: true', |
83 | | - ]) |
84 | | - end |
85 | | - end |
86 | | - |
87 | | - describe 'without external_core' do |
88 | | - let(:params) { { external_core: false } } |
89 | | - |
90 | | - it { should contain_foreman_proxy__plugin('dynflow_core') } |
91 | | - it { should contain_service('smart_proxy_dynflow_core'). |
92 | | - with(ensure: false, enable: false) } |
93 | | - it { should contain_systemd__service_limits('foreman-proxy.service') } |
94 | | - |
95 | | - it { should_not contain_file("#{etc_dir}/smart_proxy_dynflow_core/settings.d") } |
96 | | - it { should_not contain_file("#{etc_dir}/smart_proxy_dynflow_core/settings.yml") } |
97 | | - it { should_not contain_systemd__service_limits('smart_proxy_dynflow_core.service') } |
98 | | - |
99 | | - it 'should generate correct dynflow.yml' do |
100 | | - verify_exact_contents(catalogue, "#{etc_dir}/foreman-proxy/settings.d/dynflow.yml", [ |
101 | | - '---', |
102 | | - ':enabled: https', |
103 | | - ':database: ', |
104 | | - ':core_url: https://foo.example.com:8008', |
105 | | - ':external_core: false', |
| 45 | + ':console_auth: true', |
106 | 46 | ]) |
107 | 47 | end |
108 | 48 | end |
|
0 commit comments