7a2de621c3cd370775933cc8c151d13805cc6bcf
[arvados-formula.git] / test / integration / workbench / controls / config_spec.rb
1 # frozen_string_literal: true
2
3 workbench_config = <<-WORKBENCH_STANZA
4     Workbench:
5       SecretKeyBase: changeme_workbench_secret_key
6       SiteName:  FIXME
7 WORKBENCH_STANZA
8
9 workbench_service = <<-WORKBENCH_SERVICE_STANZA
10       Workbench1:
11         ExternalURL: "https://workbench.example.net"
12 WORKBENCH_SERVICE_STANZA
13
14 control 'arvados configuration' do
15   title 'should match desired workbench 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(workbench_config) }
28     its('content') { should include(workbench_service) }
29   end
30 end