feat(components): add submodules and tests
[arvados-formula.git] / test / integration / api / controls / config_spec.rb
1 # frozen_string_literal: true
2
3 api_stanza = <<-API_STANZA
4     API:
5       RailsSessionSecretToken: "changeme_rails_secret_token"
6 API_STANZA
7
8 rails_stanza = <<-RAILS_STANZA
9       RailsAPI:
10         InternalURLs:
11           "http://localhost:8004": {}
12 RAILS_STANZA
13
14 control 'arvados configuration' do
15   title 'should match desired api lines'
16
17   describe file('/etc/arvados/config.yml') do
18     it { should be_file }
19     it { should be_owned_by 'root' }
20     it { should be_grouped_into 'www-data' }
21     its('mode') { should cmp '0640' }
22     its('content') do
23       should include(
24         'File managed by Salt at <salt://arvados/files/default/config.tmpl.jinja>.'
25       )
26     end
27     its('content') { should include(api_stanza) }
28     its('content') { should include(rails_stanza) }
29   end
30 end