fix(config): RailsSessionSecretToken is deprecated
[arvados-formula.git] / test / integration / api / controls / config_spec.rb
1 # frozen_string_literal: true
2
3 api_stanza = <<-API_STANZA
4     API:
5 API_STANZA
6
7 rails_stanza = <<-RAILS_STANZA
8       RailsAPI:
9         InternalURLs:
10           http://api.internal:8004: {}
11 RAILS_STANZA
12
13 group = case os[:name]
14         when 'centos'
15           'nginx'
16         when 'debian', 'ubuntu'
17           'www-data'
18         end
19
20 control 'arvados configuration' do
21   title 'should match desired api lines'
22
23   describe file('/etc/arvados/config.yml') do
24     it { should be_file }
25     it { should be_owned_by 'root' }
26     it { should be_grouped_into group }
27     its('mode') { should cmp '0640' }
28     its('content') do
29       should include(
30         'File managed by Salt at <salt://arvados/files/default/config.tmpl.jinja>.'
31       )
32     end
33     its('content') { should include(api_stanza) }
34     its('content') { should include(rails_stanza) }
35   end
36 end