X-Git-Url: https://git.arvados.org/arvados-formula.git/blobdiff_plain/44506de8d5acbdd35b4d1f56c7a1a46085c7c7cf..27a9e7c6ce339516760508d8341d5515f3cc070a:/test/integration/keepbalance/controls/config_spec.rb diff --git a/test/integration/keepbalance/controls/config_spec.rb b/test/integration/keepbalance/controls/config_spec.rb new file mode 100644 index 0000000..73b6da9 --- /dev/null +++ b/test/integration/keepbalance/controls/config_spec.rb @@ -0,0 +1,39 @@ +# frozen_string_literal: true + +keepbalance_stanza = <<-KEEPBALANCE_STANZA + Keepbalance: + InternalURLs: + http://fixme.example.net:9005: {} +KEEPBALANCE_STANZA + +collections_stanza = <<-COLLECTIONS_STANZA + Collections: + BlobSigningKey: "blobsigningkeymushaveatleast32characters" + BlobTrash: true +COLLECTIONS_STANZA + +group = case os[:name] + when 'centos' + 'nginx' + when 'debian', 'ubuntu' + 'www-data' + end + +control 'arvados configuration' do + title 'should match desired keepbalance lines' + + describe file('/etc/arvados/config.yml') do + it { should be_file } + it { should be_owned_by 'root' } + # We're testing it in the API instance, so group will be nginx's + it { should be_grouped_into group } + its('mode') { should cmp '0640' } + its('content') do + should include( + 'File managed by Salt at .' + ) + end + its('content') { should include(keepbalance_stanza) } + its('content') { should include(collections_stanza) } + end +end