diff options
| author | Luke Kanies <luke@madstop.com> | 2007-08-28 16:15:05 -0500 |
|---|---|---|
| committer | Luke Kanies <luke@madstop.com> | 2007-08-28 16:15:05 -0500 |
| commit | 6832a4b08ecddbe017cc6393bc02cb448e607b1b (patch) | |
| tree | 76b9e243e84b2ea587f7f14a236e620c8f9e8d67 /test | |
| parent | 2625eb1db70361f9f14710ccc36090374ee282fb (diff) | |
| download | puppet-6832a4b08ecddbe017cc6393bc02cb448e607b1b.tar.gz puppet-6832a4b08ecddbe017cc6393bc02cb448e607b1b.tar.xz puppet-6832a4b08ecddbe017cc6393bc02cb448e607b1b.zip | |
Fixing some failing unit tests.
Diffstat (limited to 'test')
| -rwxr-xr-x | test/network/server/webrick.rb | 9 | ||||
| -rwxr-xr-x | test/puppet/defaults.rb | 26 | ||||
| -rwxr-xr-x | test/rails/collection.rb | 6 |
3 files changed, 8 insertions, 33 deletions
diff --git a/test/network/server/webrick.rb b/test/network/server/webrick.rb index 69f23f3c2..a9448fe6c 100755 --- a/test/network/server/webrick.rb +++ b/test/network/server/webrick.rb @@ -86,10 +86,11 @@ class TestWebrickServer < Test::Unit::TestCase kill_and_wait(serverpid, server.pidfile) serverpid, server = mk_status_server - client = mk_status_client - # This time the client should be denied - assert_raise(Puppet::Network::XMLRPCClientError) { - client.status + # This time the client should be denied. With keep-alive, + # the client starts its connection immediately, thus throwing + # the error. + assert_raise(OpenSSL::SSL::SSLError) { + client = Puppet::Network::Client.status.new(:Server => "localhost", :Port => @@port) } end diff --git a/test/puppet/defaults.rb b/test/puppet/defaults.rb index 19db3fe05..383153e45 100755 --- a/test/puppet/defaults.rb +++ b/test/puppet/defaults.rb @@ -38,32 +38,6 @@ class TestPuppetDefaults < Test::Unit::TestCase } end - if __FILE__ == $0 - def disabled_testContained - confdir = Regexp.new(Puppet[:confdir]) - vardir = Regexp.new(Puppet[:vardir]) - [@@dirs,@@files].flatten.each { |param| - value = Puppet[param] - - unless value =~ confdir or value =~ vardir - assert_nothing_raised { raise "%s is in wrong dir: %s" % - [param,value] } - end - } - end - end - - def testArgumentTypes - assert_raise(ArgumentError) { Puppet[["string"]] } - assert_raise(ArgumentError) { Puppet[[:symbol]] } - end - - def testFailOnBogusArgs - [0, "ashoweklj", ";"].each { |param| - assert_raise(ArgumentError, "No error on %s" % param) { Puppet[param] } - } - end - # we don't want user defaults in /, or root defaults in ~ def testDefaultsInCorrectRoots notval = nil diff --git a/test/rails/collection.rb b/test/rails/collection.rb index 18de3c77b..31aa02928 100755 --- a/test/rails/collection.rb +++ b/test/rails/collection.rb @@ -48,10 +48,10 @@ class TestRailsCollection < PuppetTest::TestCase end # Set it in our scope - @scope.configuration.add_collection(coll) + @scope.compile.add_collection(coll) # Make sure it's in the collections - assert_equal([coll], @scope.configuration.collections) + assert_equal([coll], @scope.compile.collections) # And try to collect the virtual resources. ret = nil @@ -122,7 +122,7 @@ class TestRailsCollection < PuppetTest::TestCase # Make a new set with a different node name node = mknode("other") - config = Puppet::Parser::Configuration.new(node, mkparser) + config = Puppet::Parser::Compile.new(node, mkparser) config.topscope.source = mock("source") # It's important that it's a different name, since same-name resources are ignored. |
