Sha256: 6254c05019c7772e3ccef0eb7ea47c0ab70d62e77cd1a85ec8a135f8b9aa717b

Contents?: true

Size: 929 Bytes

Versions: 41

Compression:

Stored size: 929 Bytes

Contents

require 'spec_helper'

set :os, { :family => nil }

describe get_command(:get_user_uid, 'foo') do
  it { should eq 'id -u foo' }
end

describe get_command(:get_user_gid, 'foo') do
  it { should eq 'id -g foo' }
end

describe get_command(:get_user_home_directory, 'foo') do
  it { should eq "getent passwd foo | awk -F: '{ print $6 }'" }
end

describe get_command(:update_user_uid, 'foo', 100) do
  it { should eq 'usermod -u 100 foo' }
end

describe get_command(:update_user_gid, 'foo', 100) do
  it { should eq 'usermod -g 100 foo' }
end

describe get_command(:add_user, 'foo', :home_directory => '/home/foo') do
  it { should eq 'useradd -d /home/foo foo' }
end

describe get_command(:update_user_encrypted_password, 'foo', 'xxxxxxxx') do
  it { should eq 'echo foo:xxxxxxxx | chpasswd -e' }
end

describe get_command(:get_user_encrypted_password, 'foo') do
  it { should eq "getent shadow foo | awk -F: '{ print $2 }'" }
end

Version data entries

41 entries across 41 versions & 1 rubygems

Version Path
specinfra-2.10.1 spec/command/base/user_spec.rb
specinfra-2.10.0 spec/command/base/user_spec.rb
specinfra-2.9.3 spec/command/base/user_spec.rb
specinfra-2.9.2 spec/command/base/user_spec.rb
specinfra-2.9.1 spec/command/base/user_spec.rb
specinfra-2.9.0 spec/command/base/user_spec.rb
specinfra-2.8.0 spec/command/base/user_spec.rb
specinfra-2.7.0 spec/command/base/user_spec.rb
specinfra-2.6.0 spec/command/base/user_spec.rb
specinfra-2.5.0 spec/command/base/user_spec.rb
specinfra-2.4.5 spec/command/base/user_spec.rb
specinfra-2.4.4 spec/command/base/user_spec.rb
specinfra-2.4.3 spec/command/base/user_spec.rb
specinfra-2.4.2 spec/command/base/user_spec.rb
specinfra-2.4.1 spec/command/base/user_spec.rb
specinfra-2.4.0 spec/command/base/user_spec.rb
specinfra-2.3.2 spec/command/base/user_spec.rb
specinfra-2.3.1 spec/command/base/user_spec.rb
specinfra-2.3.0 spec/command/base/user_spec.rb
specinfra-2.2.4 spec/command/base/user_spec.rb