X-Git-Url: https://git.arvados.org/arvados-formula.git/blobdiff_plain/fd654a4138340c1ddb0dcc5a406ede4b7c62b13f..4bf9501a14f86845865244ee3ffb03a34707d36c:/test/integration/shell/controls/config_spec.rb diff --git a/test/integration/shell/controls/config_spec.rb b/test/integration/shell/controls/config_spec.rb new file mode 100644 index 0000000..9fa65b7 --- /dev/null +++ b/test/integration/shell/controls/config_spec.rb @@ -0,0 +1,49 @@ +# frozen_string_literal: true + +siab_stanza = <<~SIAB_STANZA + SHELLINABOX_PORT=4200 + # SSL is disabled because it is terminated in Nginx. Adjust as needed. + SHELLINABOX_ARGS="--disable-ssl --no-beep --service=/shell.fixme.example.net:AUTH:HOME:SHELL" +SIAB_STANZA + +libpam_stanza = <<~LIBPAM_STANZA + auth [success=1 default=ignore] /usr/lib/pam_arvados.so fixme.example.net shell.fixme.example.net +LIBPAM_STANZA + +control 'shellinabox configuration' do + title 'should match desired lines' + + describe file('/etc/default/shellinabox') do + it { should be_file } + it { should be_owned_by 'root' } + it { should be_grouped_into 'root' } + its('mode') { should cmp '0644' } + its('content') do + should include( + # rubocop:disable Metrics/LineLength + 'File managed by Salt at .' + # rubocop:enable Metrics/LineLength + ) + end + its('content') { should include(siab_stanza) } + end +end + +control 'libpam-arvados configuration' do + title 'should match desired lines' + + describe file('/etc/pam.d/arvados') do + it { should be_file } + it { should be_owned_by 'root' } + it { should be_grouped_into 'root' } + its('mode') { should cmp '0644' } + its('content') do + should include( + # rubocop:disable Metrics/LineLength + 'File managed by Salt at .' + # rubocop:enable Metrics/LineLength + ) + end + its('content') { should include(libpam_stanza) } + end +end