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