summaryrefslogtreecommitdiffstats
path: root/test/network/handler
diff options
context:
space:
mode:
authorLuke Kanies <luke@madstop.com>2007-08-20 13:28:40 -0500
committerLuke Kanies <luke@madstop.com>2007-08-20 13:28:40 -0500
commit6467c21e15b8a28e627d1395f76fe8f42ee77d70 (patch)
treec36f4e350074a028ba6cc9f8e4230284e880ab46 /test/network/handler
parenta846ea900f9fa7a2baaa4fbd0742f080e7fd7a04 (diff)
downloadpuppet-6467c21e15b8a28e627d1395f76fe8f42ee77d70.tar.gz
puppet-6467c21e15b8a28e627d1395f76fe8f42ee77d70.tar.xz
puppet-6467c21e15b8a28e627d1395f76fe8f42ee77d70.zip
The first pass where at least all of the snippet tests pass. I have unfortunately had to stop being so assiduous in my rewriting of tests, but I am in too much of a time crunch to do this "right". The basic structure is definitely in place, though, and from here it is a question of making the rest of the tests work and hopefully writing some sufficient new tests, rather than making the code itself work.
Diffstat (limited to 'test/network/handler')
-rwxr-xr-xtest/network/handler/master.rb74
1 files changed, 0 insertions, 74 deletions
diff --git a/test/network/handler/master.rb b/test/network/handler/master.rb
index 08e17373b..9cf52b1cd 100755
--- a/test/network/handler/master.rb
+++ b/test/network/handler/master.rb
@@ -8,56 +8,6 @@ require 'puppet/network/handler/master'
class TestMaster < Test::Unit::TestCase
include PuppetTest::ServerTest
- # run through all of the existing test files and make sure everything
- # works
- def test_files
- count = 0
- textfiles { |file|
- Puppet.debug("parsing %s" % file)
- client = nil
- master = nil
-
- # create our master
- assert_nothing_raised() {
- # this is the default server setup
- master = Puppet::Network::Handler.master.new(
- :Manifest => file,
- :UseNodes => false,
- :Local => true
- )
- }
-
- # and our client
- assert_nothing_raised() {
- client = Puppet::Network::Client.master.new(
- :Master => master
- )
- }
-
- # pull our configuration a few times
- assert_nothing_raised() {
- client.getconfig
- stopservices
- Puppet::Type.allclear
- }
- assert_nothing_raised() {
- client.getconfig
- stopservices
- Puppet::Type.allclear
- }
- assert_nothing_raised() {
- client.getconfig
- stopservices
- Puppet::Type.allclear
- }
- # only test three files; that's plenty
- if count > 3
- break
- end
- count += 1
- }
- end
-
def test_defaultmanifest
textfiles { |file|
Puppet[:manifest] = file
@@ -166,30 +116,6 @@ class TestMaster < Test::Unit::TestCase
assert(FileTest.exists?(file2), "Second file %s does not exist" % file2)
end
- def test_addfacts
- master = nil
- file = mktestmanifest()
- # create our master
- assert_nothing_raised() {
- # this is the default server setup
- master = Puppet::Network::Handler.master.new(
- :Manifest => file,
- :UseNodes => false,
- :Local => true
- )
- }
-
- facts = {}
-
- assert_nothing_raised {
- master.addfacts(facts)
- }
-
- %w{serverversion servername serverip}.each do |fact|
- assert(facts.include?(fact), "Fact %s was not set" % fact)
- end
- end
-
# Make sure we're using the hostname as configured with :node_name
def test_hostname_in_getconfig
master = nil