feat(distro): add centos-7 support
[arvados-formula.git] / test / integration / controller / controls / config_spec.rb
1 # frozen_string_literal: true
2
3 controller_stanza = <<-CONTROLLER_STANZA
4       Keepstore:
5         InternalURLs:
6           http://keep0.fixme.example.net:25107: {}
7 CONTROLLER_STANZA
8
9 volumes_stanza = <<-VOLUMES_STANZA
10     Volumes:
11       fixme-nyw5e-000000000000000:
12         AccessViaHosts:
13           http://keep0.fixme.example.net:25107:
14             ReadOnly: false
15         Driver: Directory
16         DriverParameters:
17           Root: /tmp
18         Replication: 2
19 VOLUMES_STANZA
20
21 group = case os[:name]
22         when 'centos'
23           'nginx'
24         when 'debian', 'ubuntu'
25           'www-data'
26         end
27
28 control 'arvados configuration' do
29   title 'should match desired controller lines'
30
31   describe file('/etc/arvados/config.yml') do
32     it { should be_file }
33     it { should be_owned_by 'root' }
34     # We're testing it in the API instance, so group will be nginx's
35     it { should be_grouped_into group }
36     its('mode') { should cmp '0640' }
37     its('content') do
38       should include(
39         'File managed by Salt at <salt://arvados/files/default/config.tmpl.jinja>.'
40       )
41     end
42     its('content') { should include(controller_stanza) }
43     its('content') { should include(volumes_stanza) }
44   end
45 end