Merge branch '18631-shell-login-sync'
[arvados-formula.git] / test / integration / keepbalance / controls / config_spec.rb
1 # frozen_string_literal: true
2
3 keepbalance_stanza = <<-KEEPBALANCE_STANZA
4       Keepbalance:
5         InternalURLs:
6           http://fixme.example.net:9005: {}
7 KEEPBALANCE_STANZA
8
9 group = case os[:name]
10         when 'centos'
11           'nginx'
12         when 'debian', 'ubuntu'
13           'www-data'
14         end
15
16 control 'arvados configuration' do
17   title 'should match desired keepbalance lines'
18
19   describe file('/etc/arvados/config.yml') do
20     it { should be_file }
21     it { should be_owned_by 'root' }
22     # We're testing it in the API instance, so group will be nginx's
23     it { should be_grouped_into group }
24     its('mode') { should cmp '0640' }
25     its('content') do
26       should include(
27         'File managed by Salt at <salt://arvados/files/default/config.tmpl.jinja>.'
28       )
29     end
30     its('content') { should include(keepbalance_stanza) }
31   end
32 end