Sha256: 7fcffab3f002fe3bda738a83c2b1b62f1445832c163f11ff404e24d1347e9745

Contents?: true

Size: 1.56 KB

Versions: 1

Compression:

Stored size: 1.56 KB

Contents

require 'spec_helper'

describe 'Serverspec matchers of Solaris family', :os => :solaris do
  it_behaves_like 'support be_enabled matcher', 'svc:/network/ssh:default'
  it_behaves_like 'support be_installed matcher', 'service/network/ssh'
  it_behaves_like 'support be_running matcher', 'svc:/network/ssh:default'
  it_behaves_like 'support be_listening matcher', 22
  it_behaves_like 'support be_file matcher', '/etc/ssh/sshd_config'
  it_behaves_like 'support be_directory matcher', '/etc/ssh'
  it_behaves_like 'support contain matcher', '/etc/ssh/sshd_config', 'Configuration file for sshd(1m) (see also sshd_config(4))'
  it_behaves_like 'support be_user matcher', 'root'
  it_behaves_like 'support be_group matcher', 'root'

  # Test for case of not registered in the service, but running as process.
  it_behaves_like 'support be_running matcher', 'udevd'

  it_behaves_like 'support be_mode matcher', '/etc/passwd', 644

  it_behaves_like 'support be_owned_by matcher', '/etc/passwd', 'root'
  it_behaves_like 'support be_grouped_into matcher', '/etc/passwd', 'root'

  it_behaves_like 'support have_cron_entry matcher', 'cron', '* * * * * /usr/bin/foo'
  it_behaves_like 'support have_cron_entry.with_user matcher', 'cron', '* * * * * /usr/bin/foo', 'root'

  it_behaves_like 'support be_linked_to matcher', '/etc/pam.d/system-auth', '/etc/pam.d/system-auth-ac'

  it_behaves_like 'support be_installed_by_gem matcher', 'jekyll'
  it_behaves_like 'support be_installed_by_gem.with_version matcher', 'jekyll', '1.0.0'

  it_behaves_like 'support belong_to_group matcher', 'root', 'root'

end

Version data entries

1 entries across 1 versions & 1 rubygems

Version Path
serverspec-0.1.0 spec/solaris/matchers_spec.rb