summaryrefslogtreecommitdiffstats
path: root/test/network/client
diff options
context:
space:
mode:
authorLuke Kanies <luke@madstop.com>2007-11-18 11:21:22 -0600
committerLuke Kanies <luke@madstop.com>2007-11-18 11:21:22 -0600
commitc19835ce9f8a5138b30a1a32ca741c996b0916d2 (patch)
tree1a7b05839f013cc8a610f7c9493e206606fab977 /test/network/client
parent9290cc89a2206fb5204578f8e91208857a48b147 (diff)
downloadpuppet-c19835ce9f8a5138b30a1a32ca741c996b0916d2.tar.gz
puppet-c19835ce9f8a5138b30a1a32ca741c996b0916d2.tar.xz
puppet-c19835ce9f8a5138b30a1a32ca741c996b0916d2.zip
Fixed most failing tests, but there are still over thirty failing.
At this point, I'm holding the experiment until after the release, so I'm committing this for now and will take it back up after 0.24.0 is out.
Diffstat (limited to 'test/network/client')
-rwxr-xr-xtest/network/client/client.rb29
-rwxr-xr-xtest/network/client/master.rb51
2 files changed, 0 insertions, 80 deletions
diff --git a/test/network/client/client.rb b/test/network/client/client.rb
index 4a7e9cdb6..8d08bd3d7 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 7216af936..0caba4bd2 100755
--- a/test/network/client/master.rb
+++ b/test/network/client/master.rb
@@ -332,39 +332,6 @@ end
assert(FileTest.exists?(file), "file was not created on second run")
end
- def test_default_objects
- # Make sure they start out missing
- assert_nil(Puppet::Type.type(:filebucket)["puppet"],
- "default filebucket already exists")
- assert_nil(Puppet::Type.type(:schedule)["daily"],
- "default schedules already exists")
-
- master = mkclient()
-
- # Now make sure they got created
- assert(Puppet::Type.type(:filebucket)["puppet"],
- "default filebucket not found")
- assert(Puppet::Type.type(:schedule)["daily"],
- "default schedules not found")
-
- # clear everything, and make sure we can recreate them
- Puppet::Type.allclear
- assert_nil(Puppet::Type.type(:filebucket)["puppet"],
- "default filebucket not removed")
- assert_nil(Puppet::Type.type(:schedule)["daily"],
- "default schedules not removed")
- assert_nothing_raised { master.mkdefault_objects }
- assert(Puppet::Type.type(:filebucket)["puppet"],
- "default filebucket not found")
- assert(Puppet::Type.type(:schedule)["daily"],
- "default schedules not found")
-
-
- # Make sure we've got schedules
- assert(Puppet::Type.type(:schedule)["hourly"], "Could not retrieve hourly schedule")
- assert(Puppet::Type.type(:filebucket)["puppet"], "Could not retrieve default bucket")
- end
-
# #540 - make sure downloads aren't affected by noop
def test_download_in_noop
source = tempfile
@@ -550,24 +517,6 @@ end
assert_equal(facts["environment"], Puppet[:environment], "Did not add environment to client facts")
end
- # This is partially to fix #532, but also to save on memory.
- def test_remove_objects_after_every_run
- client = mkclient
-
- ftype = Puppet::Type.type(:file)
- file = ftype.create :title => "/what/ever", :ensure => :present
- config = Puppet::Node::Configuration.new
- config.add_resource(file)
-
- config.expects :apply
-
- client.configuration = config
- client.expects(:getconfig)
- client.run
-
- assert_nil(ftype[@createdfile], "file object was not removed from memory")
- end
-
# #685
def test_http_failures_do_not_kill_puppetd
client = mkclient