summaryrefslogtreecommitdiffstats
path: root/test/language/snippets.rb
diff options
context:
space:
mode:
authorMichael V. O'Brien <michael@reductivelabs.com>2007-09-25 12:00:07 -0500
committerMichael V. O'Brien <michael@reductivelabs.com>2007-09-25 12:00:07 -0500
commitff2828f5dbe68ff1cb06a3503590a3e4bd1b59e3 (patch)
tree8c8960cac1d7b3e8b48e44163062be3b3f4c201f /test/language/snippets.rb
parentf8ab62b212788a4591276c95b5f67217f7517e4e (diff)
parentffaa8ce07979f4db860950fa9be08ca37964206f (diff)
downloadpuppet-ff2828f5dbe68ff1cb06a3503590a3e4bd1b59e3.tar.gz
puppet-ff2828f5dbe68ff1cb06a3503590a3e4bd1b59e3.tar.xz
puppet-ff2828f5dbe68ff1cb06a3503590a3e4bd1b59e3.zip
Merge branch 'master' of git://reductivelabs.com/puppet
Diffstat (limited to 'test/language/snippets.rb')
-rwxr-xr-xtest/language/snippets.rb18
1 files changed, 6 insertions, 12 deletions
diff --git a/test/language/snippets.rb b/test/language/snippets.rb
index 2c74543e7..7168a81d8 100755
--- a/test/language/snippets.rb
+++ b/test/language/snippets.rb
@@ -197,7 +197,7 @@ class TestSnippets < Test::Unit::TestCase
def snippet_classpathtest
path = "/tmp/classtest"
- file = @file[path]
+ file = @configuration.resource(:file, path)
assert(file, "did not create file %s" % path)
assert_nothing_raised {
@@ -271,14 +271,6 @@ class TestSnippets < Test::Unit::TestCase
assert_mode_equal(0755, file)
end
- def snippet_failmissingexecpath
- file = "/tmp/exectesting1"
- execfile = "/tmp/execdisttesting"
- assert_file(file)
-
- assert_nil(Puppet::Type.type(:exec)["exectest"], "invalid exec was created")
- end
-
def snippet_selectorvalues
nums = %w{1 2 3 4 5}
files = nums.collect { |n|
@@ -472,13 +464,14 @@ class TestSnippets < Test::Unit::TestCase
:Manifest => snippet(file),
:Local => true
)
- server.send(:fact_handler).stubs(:set)
- server.send(:fact_handler).stubs(:get).returns(facts)
+ facts = Puppet::Node::Facts.new("testhost", facts)
+ Puppet::Node::Facts.stubs(:save)
+ Puppet::Node::Facts.stubs(:find).returns(facts)
client = Puppet::Network::Client.master.new(
:Master => server,
:Cache => false
)
- client.class.stubs(:facts).returns(facts)
+ client.class.stubs(:facts).returns(facts.values)
assert(client.local)
assert_nothing_raised {
@@ -507,6 +500,7 @@ class TestSnippets < Test::Unit::TestCase
assert(obj.name)
}
}
+ @configuration = client.configuration
assert_nothing_raised {
self.send(mname)
}