docs(single_host): fix hostnames and tests
[arvados-formula.git] / test / integration / keepweb / controls / config_spec.rb
1 # frozen_string_literal: true
2
3 keepweb_stanza = <<-KEEPWEB_STANZA
4       WebDAV:
5         ExternalURL: https://collections.fixme.example.net
6         InternalURLs:
7           http://collections.internal:9002: {}
8       WebDAVDownload:
9         ExternalURL: https://download.fixme.example.net
10 KEEPWEB_STANZA
11
12 group = case os[:name]
13         when 'centos'
14           'nginx'
15         when 'debian', 'ubuntu'
16           'www-data'
17         end
18
19 control 'arvados configuration' do
20   title 'should match desired keepweb lines'
21
22   describe file('/etc/arvados/config.yml') do
23     it { should be_file }
24     it { should be_owned_by 'root' }
25     # We're testing it in the API instance, so group will be nginx's
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(keepweb_stanza) }
34   end
35 end