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