Sha256: 86dd625101d9216056dc3880eec8c59161e7d2fb3f10d6cce66d6879c8217eec
Contents?: true
Size: 1.49 KB
Versions: 1
Compression:
Stored size: 1.49 KB
Contents
require 'spec_helper' set :os, :family => 'base' describe commands.command_class('user').create do it { should be_an_instance_of(Specinfra::Command::Base::User) } end describe user('root') do it { should exist } end describe user('invalid-user') do it { should_not exist } end describe user('root') do it { should belong_to_group 'root' } end describe user('root') do it { should belong_to_primary_group 'root' } end describe user('root') do it { should_not belong_to_group 'invalid-group' } end describe user('root') do it { should have_uid 0 } end describe user('root') do it { should_not have_uid 'invalid-uid' } end describe user('root') do it { should have_login_shell '/bin/bash' } end describe user('root') do it { should_not have_login_shell 'invalid-login-shell' } end describe user('root') do it { should have_home_directory '/root' } end describe user('root') do it { should_not have_home_directory 'invalid-home-directory' } end describe user('root') do it { should have_authorized_key 'ssh-rsa ABCDEFGHIJKLMNOPQRSTUVWXYZABCDEFGHIJKLMNOPQRSTUVWXYZABCDEFGHIJKLMNOPQRSTUVWXYZABCDEFGHIJKLMNOPQRSTUVWXYZABCDEFGHIJKLMNOPQRSTUVWXYZABCDEFGHIJKLMNOPQRSTUVWXYZABCDEFGHIJKLMNOPQRSTUVWXYZABCDEFGHIJKLMNOPQRSTUVWXYZABCDEFGHIJKLMNOPQRSTUVWXYZABCDEFGHIJKLMNOPQRSTUVWXYZABCDEFGHIJKLMNOPQRSTUVWXYZABCDEFGHIJKLMNOPQRSTUVWXYZABCDEFGHIJKLMNOPQRSTUVWXYZABCDEFGHIJKLMNOPQRSTUVWXYZABCDEFGH foo@bar.local' } end describe user('root') do it { should_not have_authorized_key 'invalid-key' } end
Version data entries
1 entries across 1 versions & 1 rubygems
Version | Path |
---|---|
serverspec-2.0.0.beta13 | spec/type/base/user_spec.rb |