d44e6737b1be25537b67cc8de3712502d09b74fc
[arvados-formula.git] / test / integration / keepstore / controls / config_spec.rb
1 # frozen_string_literal: true
2
3 keepstore_stanza = <<-KEEPSTORE_STANZA
4       Keepstore:
5         InternalURLs:
6           http://keep0.fixme.example.net:25107: {}
7 KEEPSTORE_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 control 'arvados configuration' do
22   title 'should match desired keepstore lines'
23
24   describe file('/etc/arvados/config.yml') do
25     it { should be_file }
26     it { should be_owned_by 'root' }
27     it { should be_grouped_into 'root' }
28     its('mode') { should cmp '0640' }
29     its('content') do
30       should include(
31         'File managed by Salt at <salt://arvados/files/default/config.tmpl.jinja>.'
32       )
33     end
34     its('content') { should include(keepstore_stanza) }
35     its('content') { should include(volumes_stanza) }
36   end
37 end