diff options
| author | luke <luke@980ebf18-57e1-0310-9a29-db15c13687c0> | 2006-07-03 23:15:15 +0000 |
|---|---|---|
| committer | luke <luke@980ebf18-57e1-0310-9a29-db15c13687c0> | 2006-07-03 23:15:15 +0000 |
| commit | 2e78526b6bf646584feb19adb95a4f5fdd8f8b7a (patch) | |
| tree | 83ee22f8ef7563580fbbedab1d061ca337b8ad50 /test | |
| parent | e57c5131aee017bd015e9419b5a1ceeb306677a7 (diff) | |
| download | puppet-2e78526b6bf646584feb19adb95a4f5fdd8f8b7a.tar.gz puppet-2e78526b6bf646584feb19adb95a4f5fdd8f8b7a.tar.xz puppet-2e78526b6bf646584feb19adb95a4f5fdd8f8b7a.zip | |
Some updates resulting from trying to track down a segfault introduced when I upgraded to 1.8.4-5 in Debian. I never found the segfault and had ot downgrade to 1.8.4-1. I expect it will not be encountered in real life, only in testing.
git-svn-id: https://reductivelabs.com/svn/puppet/trunk@1355 980ebf18-57e1-0310-9a29-db15c13687c0
Diffstat (limited to 'test')
| -rw-r--r-- | test/client/master.rb | 4 | ||||
| -rw-r--r-- | test/puppettest.rb | 12 | ||||
| -rw-r--r-- | test/server/bucket.rb | 1 |
3 files changed, 12 insertions, 5 deletions
diff --git a/test/client/master.rb b/test/client/master.rb index 0a35a78c3..7e447b095 100644 --- a/test/client/master.rb +++ b/test/client/master.rb @@ -118,20 +118,24 @@ class TestMasterClient < Test::Unit::TestCase # Make sure non-string facts don't make things go kablooie def test_nonstring_facts + Puppet.err :a # Add a nonstring fact Facter.add("nonstring") do setcode { 1 } end + Puppet.err :b assert_equal(1, Facter.nonstring, "Fact was a string from facter") client = mkclient() assert(! FileTest.exists?(@createdfile)) + Puppet.err :c assert_nothing_raised { client.run } + Puppet.err :d end def test_getplugins diff --git a/test/puppettest.rb b/test/puppettest.rb index 5cf247a63..121eee3e2 100644 --- a/test/puppettest.rb +++ b/test/puppettest.rb @@ -66,6 +66,7 @@ module TestPuppet Puppet::Log.newdestination :console Puppet::Log.level = :debug #$VERBOSE = 1 + Puppet.info @method_name else Puppet::Log.close Puppet::Log.newdestination tempfile() @@ -169,7 +170,8 @@ module TestPuppet @@tmpfilenum = 1 end - f = File.join(self.tmpdir(), self.class.to_s + "testfile" + @@tmpfilenum.to_s) + f = File.join(self.tmpdir(), self.class.to_s + "_" + @method_name + + @@tmpfilenum.to_s) @@tmpfiles << f return f end @@ -180,7 +182,7 @@ module TestPuppet else @@testdirnum = 1 end - d = File.join(self.tmpdir(), self.class.to_s + "testdir" + @@testdirnum.to_s) + d = File.join(self.tmpdir(), self.class.to_s + "_" + @method_name + @@testdirnum.to_s) @@tmpfiles << d return d end @@ -349,14 +351,16 @@ module ServerTest if defined? @@port @@port += 1 else - @@port = 8085 + @@port = 20000 end end # create a simple manifest that just creates a file def mktestmanifest file = File.join(Puppet[:confdir], "%ssite.pp" % (self.class.to_s + "test")) - @createdfile = File.join(tmpdir(), self.class.to_s + "servermanifesttesting") + #@createdfile = File.join(tmpdir(), self.class.to_s + "manifesttesting" + + # "_" + @method_name) + @createdfile = tempfile() File.open(file, "w") { |f| f.puts "file { \"%s\": ensure => file, mode => 755 }\n" % @createdfile diff --git a/test/server/bucket.rb b/test/server/bucket.rb index 3169781f8..8171b2740 100644 --- a/test/server/bucket.rb +++ b/test/server/bucket.rb @@ -23,7 +23,6 @@ class TestBucket < Test::Unit::TestCase end #Puppet.err "#{Process.pid}: %s: %s" % [@num, memory()] - GC.start #gcdebug(String) end |
