diff options
author | Luke Kanies <luke@madstop.com> | 2008-10-08 22:23:40 -0500 |
---|---|---|
committer | Luke Kanies <luke@madstop.com> | 2008-10-08 22:32:56 -0500 |
commit | aea55823db21088f2dc19f99f857b12332b6c208 (patch) | |
tree | 5b5d00cab9a66a57314b36b401d09c27583573ef | |
parent | 65d3040d5d5f792405404caece16261088bfcf6a (diff) | |
download | puppet-aea55823db21088f2dc19f99f857b12332b6c208.tar.gz puppet-aea55823db21088f2dc19f99f857b12332b6c208.tar.xz puppet-aea55823db21088f2dc19f99f857b12332b6c208.zip |
Removing a gid test for users, since it is a bad test and has mostly been replaced in rspec
Signed-off-by: Luke Kanies <luke@madstop.com>
-rwxr-xr-x | lib/puppet/type/user.rb | 3 | ||||
-rwxr-xr-x | test/ral/type/user.rb | 50 |
2 files changed, 1 insertions, 52 deletions
diff --git a/lib/puppet/type/user.rb b/lib/puppet/type/user.rb index 74c4c6a33..29f4880c1 100755 --- a/lib/puppet/type/user.rb +++ b/lib/puppet/type/user.rb @@ -147,8 +147,7 @@ module Puppet raise ArgumentError, "Group names must be provided, not numbers" end if value.include?(",") - puts value - raise ArgumentError, "Group names must be provided as an array, not a comma-separated list" + raise ArgumentError, "Group names must be provided as an array, not as a comma-separated list '%s'" % value end end end diff --git a/test/ral/type/user.rb b/test/ral/type/user.rb index 87d5b6075..4c8a9f9c3 100755 --- a/test/ral/type/user.rb +++ b/test/ral/type/user.rb @@ -164,56 +164,6 @@ class TestUser < Test::Unit::TestCase assert_equal(old, user.provider.shell, "Shell was not reverted") end - def attrtest_gid(user) - obj = nil - old = user.provider.gid - comp = mk_catalog("gidtest", user) - - user.retrieve - - user[:gid] = old - - trans = assert_events([], comp, "user") - - newgid = %w{nogroup nobody staff users daemon}.find { |gid| - begin - group = Etc.getgrnam(gid) - rescue ArgumentError => detail - next - end - old != group.gid and group.gid > 0 - } - - unless newgid - $stderr.puts "Cannot find alternate group; skipping gid test" - return - end - - # first test by name - assert_nothing_raised("Failed to specify group by name") { - user[:gid] = newgid - } - - trans = assert_events([:user_changed], comp, "user") - - # then by id - newgid = Etc.getgrnam(newgid).gid - - assert_nothing_raised("Failed to specify group by id for %s" % newgid) { - user[:gid] = newgid - } - - user.retrieve - - assert_events([], comp, "user") - - assert_equal(newgid, user.provider.gid, "GID was not changed") - - assert_rollback_events(trans, [:user_changed], "user") - - assert_equal(old, user.provider.gid, "GID was not reverted") - end - def attrtest_uid(user) obj = nil comp = mk_catalog("uidtest", user) |