summaryrefslogtreecommitdiffstats
path: root/test/network/client
diff options
context:
space:
mode:
authorLuke Kanies <luke@madstop.com>2008-03-24 16:37:56 -0500
committerLuke Kanies <luke@madstop.com>2008-03-24 16:37:56 -0500
commit528bbf1caefdd6963353df9242b81409f4dacbe5 (patch)
tree3791df515950127a0b0b92ba41434522fe351c8a /test/network/client
parent017f6730aa4b8afcc0f8da80c79eb6981a1ad6b9 (diff)
downloadpuppet-528bbf1caefdd6963353df9242b81409f4dacbe5.tar.gz
puppet-528bbf1caefdd6963353df9242b81409f4dacbe5.tar.xz
puppet-528bbf1caefdd6963353df9242b81409f4dacbe5.zip
Fixing a couple of tests.
Diffstat (limited to 'test/network/client')
-rwxr-xr-xtest/network/client/client.rb29
-rwxr-xr-xtest/network/client/master.rb29
2 files changed, 29 insertions, 29 deletions
diff --git a/test/network/client/client.rb b/test/network/client/client.rb
index b6b915d31..5f96cac11 100755
--- a/test/network/client/client.rb
+++ b/test/network/client/client.rb
@@ -140,35 +140,6 @@ class TestClient < Test::Unit::TestCase
}
end
- def test_classfile
- Puppet[:code] = "class yaytest {}\n class bootest {}\n include yaytest, bootest"
-
- Puppet::Node::Facts.indirection.stubs(:save)
-
- master = client = nil
- assert_nothing_raised() {
- master = Puppet::Network::Handler.master.new(
- :Local => false
- )
- }
- assert_nothing_raised() {
- client = Puppet::Network::Client.master.new(
- :Master => master
- )
- }
-
- # Fake that it's local, so it creates the class file
- client.local = false
-
- # We can't guarantee class ordering
- client.expects(:setclasses).with do |array|
- array.length == 2 and array.include?("yaytest") and array.include?("bootest")
- end
- assert_nothing_raised {
- client.getconfig
- }
- end
-
def test_client_loading
# Make sure we don't get a failure but that we also get nothing back
assert_nothing_raised do
diff --git a/test/network/client/master.rb b/test/network/client/master.rb
index 28e7b8968..14c7dd852 100755
--- a/test/network/client/master.rb
+++ b/test/network/client/master.rb
@@ -576,4 +576,33 @@ end
# Doesn't throw an exception, but definitely fails.
client.run
end
+
+ def test_classfile
+ Puppet[:code] = "class yaytest {}\n class bootest {}\n include yaytest, bootest"
+
+ Puppet::Node::Facts.indirection.stubs(:save)
+
+ master = client = nil
+ assert_nothing_raised() {
+ master = Puppet::Network::Handler.master.new(
+ :Local => false
+ )
+ }
+ assert_nothing_raised() {
+ client = Puppet::Network::Client.master.new(
+ :Master => master
+ )
+ }
+
+ # Fake that it's local, so it creates the class file
+ client.local = false
+
+ # We can't guarantee class ordering
+ client.expects(:setclasses).with do |array|
+ array.length == 2 and array.include?("yaytest") and array.include?("bootest")
+ end
+ assert_nothing_raised {
+ client.getconfig
+ }
+ end
end