9fb74c9997b382276b8a61e368406f60a14df6f2
[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.example.net:25107/": {}
7 KEEPSTORE_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 keepstore lines'
21
22   describe file('/etc/arvados/config.yml') do
23     it { should be_file }
24     it { should be_owned_by 'root' }
25     it { should be_grouped_into 'root' }
26     its('mode') { should cmp '0640' }
27     its('content') do
28       should include(
29         'File managed by Salt at <salt://arvados/files/default/config.tmpl.jinja>.'
30       )
31     end
32     its('content') { should include(keepstore_stanza) }
33     its('content') { should include(volumes_stanza) }
34   end
35 end