X-Git-Url: https://git.arvados.org/arvados-formula.git/blobdiff_plain/86ea398742e99ab5942705b342b0f0ac7bdef41d..ba5e37ebc18049d4340388fc0c19dcb2a78d6a86:/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 index 13bfa24..603e337 100644 --- a/test/integration/shell/controls/config_spec.rb +++ b/test/integration/shell/controls/config_spec.rb @@ -1,19 +1,27 @@ # 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 + case os[:name] + when 'centos' + file = '/etc/sysconfig/shellinaboxd' + tpl = 'RedHat' + siab_stanza = <<~SIAB_STANZA + PORT=4200 + # SSL is disabled because it is terminated in Nginx. Adjust as needed. + OPTS="--disable-ssl --no-beep --service=/shell.fixme.example.net:SSH" + SIAB_STANZA + when 'debian', 'ubuntu' + file = '/etc/default/shellinabox' + tpl = 'default' + 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 + end + describe file(file) do it { should be_file } it { should be_owned_by 'root' } it { should be_grouped_into 'root' } @@ -21,7 +29,7 @@ control 'shellinabox configuration' do its('content') do should include( # rubocop:disable Layout/LineLength - 'File managed by Salt at .' + "File managed by Salt at ." # rubocop:enable Layout/LineLength ) end @@ -32,6 +40,10 @@ end control 'libpam-arvados configuration' do title 'should match desired lines' + libpam_stanza = <<~LIBPAM_STANZA + auth [success=1 default=ignore] /usr/lib/pam_arvados.so fixme.example.net shell.fixme.example.net + LIBPAM_STANZA + describe file('/etc/pam.d/arvados') do it { should be_file } it { should be_owned_by 'root' }