6e64bc40876842ad024ab91767f2afda1f8413e3
[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.example.net:25107/": {}
7 CONTROLLER_STANZA
8
9 volumes_stanza = <<-VOLUMES_STANZA
10     Volumes:
11       ### VOLUME_ONE
12       fixme-nyw5e-000000000000000:
13         Driver: Directory
14         DriverParameters: {Root: /tmp}
15         AccessViaHosts: {'http://keep0.example.net:25107/': {}}
16         Replication: 2
17 VOLUMES_STANZA
18
19 control 'arvados configuration' do
20   title 'should match desired controller 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 'www-data' }
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(controller_stanza) }
34     its('content') { should include(volumes_stanza) }
35   end
36 end