Skip to content

Commit

Permalink
Merge pull request #51 from jhoblitt/i11-user-managehome
Browse files Browse the repository at this point in the history
I11 user managehome
  • Loading branch information
Joshua Hoblitt committed Aug 8, 2015
2 parents c569f5b + 80638ae commit 6e27f73
Show file tree
Hide file tree
Showing 3 changed files with 24 additions and 3 deletions.
6 changes: 5 additions & 1 deletion manifests/init.pp
Original file line number Diff line number Diff line change
Expand Up @@ -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,
}
}

Expand Down
10 changes: 10 additions & 0 deletions spec/acceptance/selenium_spec.rb
Original file line number Diff line number Diff line change
Expand Up @@ -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
11 changes: 9 additions & 2 deletions spec/unit/classes/selenium_spec.rb
Original file line number Diff line number Diff line change
Expand Up @@ -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({
Expand Down

0 comments on commit 6e27f73

Please sign in to comment.