fix(config): ensure AnonymousUserToken is set
[arvados-formula.git] / test / integration / keepstore / controls / config_spec.rb
1 # frozen_string_literal: true
2
3 users_stanza = <<-USERS_STANZA
4     Users:
5       AnonymousUserToken: anonymoususertokensetintheusersdict
6 USERS_STANZA
7
8 keepstore_stanza = <<-KEEPSTORE_STANZA
9       Keepstore:
10         InternalURLs:
11           http://keep0.fixme.example.net:25107: {}
12 KEEPSTORE_STANZA
13
14 volumes_stanza = <<-VOLUMES_STANZA
15     Volumes:
16       fixme-nyw5e-000000000000000:
17         AccessViaHosts:
18           http://keep0.fixme.example.net:25107:
19             ReadOnly: false
20         Driver: Directory
21         DriverParameters:
22           Root: /tmp
23         Replication: 2
24 VOLUMES_STANZA
25
26 control 'arvados configuration' do
27   title 'should match desired keepstore lines'
28
29   describe file('/etc/arvados/config.yml') do
30     it { should be_file }
31     it { should be_owned_by 'root' }
32     it { should be_grouped_into 'root' }
33     its('mode') { should cmp '0640' }
34     its('content') do
35       should include(
36         'File managed by Salt at <salt://arvados/files/default/config.tmpl.jinja>.'
37       )
38     end
39     its('content') { should include(keepstore_stanza) }
40     its('content') { should include(volumes_stanza) }
41     its('content') { should include(users_stanza) }
42   end
43 end