X-Git-Url: https://git.arvados.org/arvados-formula.git/blobdiff_plain/cbd02897a8c752346b55e3899ae886651beeca2d..40e86c713b6ff239240f14fb4695185b58e5382a:/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