summaryrefslogtreecommitdiffstats
path: root/test
diff options
context:
space:
mode:
Diffstat (limited to 'test')
-rwxr-xr-xtest/types/exec.rb6
-rw-r--r--test/types/file.rb17
-rwxr-xr-xtest/types/group.rb5
3 files changed, 24 insertions, 4 deletions
diff --git a/test/types/exec.rb b/test/types/exec.rb
index 004cd6c29..cb40d4f5c 100755
--- a/test/types/exec.rb
+++ b/test/types/exec.rb
@@ -146,6 +146,7 @@ class TestExec < Test::Unit::TestCase
events = nil
assert_nothing_raised {
trans = comp.evaluate
+ file.retrieve
sum = file.state(:checksum)
assert_equal(sum.is, sum.should)
@@ -262,8 +263,9 @@ class TestExec < Test::Unit::TestCase
assert(!exec.requires?(ofile), "Exec incorrectly required file")
# Verify that we catch inline files
- assert(cat.requires?(ofile), "Exec did not catch second inline file")
- assert(cat.requires?(file), "Exec did not catch inline file")
+ # We not longer autorequire inline files
+ assert(! cat.requires?(ofile), "Exec required second inline file")
+ assert(! cat.requires?(file), "Exec required inline file")
end
def test_ifonly
diff --git a/test/types/file.rb b/test/types/file.rb
index b1172c0a8..e6d81a7a3 100644
--- a/test/types/file.rb
+++ b/test/types/file.rb
@@ -736,6 +736,23 @@ class TestFile < Test::Unit::TestCase
assert_events([], file)
assert_events([], file)
end
+
+ def test_nameandpath
+ path = tempfile()
+
+ file = nil
+ assert_nothing_raised {
+ file = Puppet.type(:file).create(
+ :name => "fileness",
+ :path => path,
+ :content => "this is some content"
+ )
+ }
+
+ assert_apply(file)
+
+ assert(FileTest.exists?(path))
+ end
end
# $Id$
diff --git a/test/types/group.rb b/test/types/group.rb
index e1b4e4fed..e044949e6 100755
--- a/test/types/group.rb
+++ b/test/types/group.rb
@@ -180,9 +180,10 @@ class TestGroup < Test::Unit::TestCase
comp = newcomp("grouptest %s" % group, gobj)
}
- trans = nil
+ #trans = nil
assert_nothing_raised {
- trans = comp.evaluate
+ gobj.retrieve
+ #trans = comp.evaluate
}
assert(gobj.is(:gid), "Failed to retrieve gid")