diff --git a/manifests/init.pp b/manifests/init.pp index 6d483fe..02720be 100644 --- a/manifests/init.pp +++ b/manifests/init.pp @@ -29,13 +29,17 @@ if $manage_user { user { $user: - gid => $group, + gid => $group, + system => true, + managehome => true, + home => '/var/lib/selenium' } } if $manage_group { group { $group: ensure => present, + system => true, } } diff --git a/spec/acceptance/selenium_spec.rb b/spec/acceptance/selenium_spec.rb index 67461c7..4ebb4a0 100644 --- a/spec/acceptance/selenium_spec.rb +++ b/spec/acceptance/selenium_spec.rb @@ -43,4 +43,14 @@ class { 'selenium': } it { should be_grouped_into 'root' } it { should be_mode 444 } end + + describe user('selenium') do + it { should exist } + it { should belong_to_group 'selenium' } + it { should have_home_directory '/var/lib/selenium' } + end + + describe group('selenium') do + it { should exist } + end end diff --git a/spec/unit/classes/selenium_spec.rb b/spec/unit/classes/selenium_spec.rb index b27b182..67c998d 100644 --- a/spec/unit/classes/selenium_spec.rb +++ b/spec/unit/classes/selenium_spec.rb @@ -26,8 +26,15 @@ path_version = p[:version].match(/^(\d+\.\d+)\./)[1] it do - should contain_user(p[:user]).with_gid(p[:group]) - should contain_group(p[:group]) + should contain_user(p[:user]).with( + :gid => p[:group], + :system => true, + :managehome => true, + :home => '/var/lib/selenium' + ) + should contain_group(p[:group]).with( + :system => true + ) should contain_class('wget') should contain_class('selenium').with_version(p[:version]) should contain_file("#{p[:install_root]}").with({