diff options
| author | luke <luke@980ebf18-57e1-0310-9a29-db15c13687c0> | 2007-03-08 06:03:36 +0000 |
|---|---|---|
| committer | luke <luke@980ebf18-57e1-0310-9a29-db15c13687c0> | 2007-03-08 06:03:36 +0000 |
| commit | 0925fb0cd9b7d370a57247b00f402d33f6f0d78b (patch) | |
| tree | 7687cce7d2c104be7acc6ec496690916b38445a0 /test | |
| parent | 333842bd860aee58cb8e7712c9e24f812b53107e (diff) | |
| download | puppet-0925fb0cd9b7d370a57247b00f402d33f6f0d78b.tar.gz puppet-0925fb0cd9b7d370a57247b00f402d33f6f0d78b.tar.xz puppet-0925fb0cd9b7d370a57247b00f402d33f6f0d78b.zip | |
Adding some more testing on the @should values for :groups on users, and fixing a bug that often made :groups think it was out of sync.
git-svn-id: https://reductivelabs.com/svn/puppet/trunk@2267 980ebf18-57e1-0310-9a29-db15c13687c0
Diffstat (limited to 'test')
| -rw-r--r-- | test/lib/puppettest/testcase.rb | 5 | ||||
| -rwxr-xr-x | test/ral/types/user.rb | 11 |
2 files changed, 13 insertions, 3 deletions
diff --git a/test/lib/puppettest/testcase.rb b/test/lib/puppettest/testcase.rb index be3ee6c6a..cfedeee26 100644 --- a/test/lib/puppettest/testcase.rb +++ b/test/lib/puppettest/testcase.rb @@ -1,11 +1,12 @@ #!/usr/bin/env ruby # -# Created by Luke A. Kanies on 2006-11-24. -# Copyright (c) 2006. All rights reserved. +# Created by Luke A. Kanies on 2007-03-05. +# Copyright (c) 2007. All rights reserved. require 'puppettest' class PuppetTest::TestCase < Test::Unit::TestCase + include PuppetTest def self.confine(hash) @confines ||= {} hash.each do |message, result| diff --git a/test/ral/types/user.rb b/test/ral/types/user.rb index 641d9cd82..8af6b5d48 100755 --- a/test/ral/types/user.rb +++ b/test/ral/types/user.rb @@ -448,11 +448,20 @@ class TestUser < Test::Unit::TestCase # Testing #455 def test_autorequire_with_no_group_should - user = Puppet::Type.type(:user).create(:name => "user", :check => :all) + user = Puppet::Type.type(:user).create(:name => "yaytest", :check => :all) assert_nothing_raised do user.autorequire end + + user[:ensure] = :absent + + assert_nothing_raised do + user.evaluate + end + + assert(user.send(:property, :groups).insync?, + "Groups state considered out of sync with no :should value") end end |
