summaryrefslogtreecommitdiffstats
path: root/test/executables
diff options
context:
space:
mode:
authorluke <luke@980ebf18-57e1-0310-9a29-db15c13687c0>2006-09-19 18:04:20 +0000
committerluke <luke@980ebf18-57e1-0310-9a29-db15c13687c0>2006-09-19 18:04:20 +0000
commit3891f48119ea01d04d7495cf2f07a9ddb37b2afc (patch)
tree564c02bc5cc3498a440ddea80e96a8852791c528 /test/executables
parentdcab464f8db80e6d8c91a595a77875222f2927bf (diff)
downloadpuppet-3891f48119ea01d04d7495cf2f07a9ddb37b2afc.tar.gz
puppet-3891f48119ea01d04d7495cf2f07a9ddb37b2afc.tar.xz
puppet-3891f48119ea01d04d7495cf2f07a9ddb37b2afc.zip
Converting to using the Rakefile for testing. The old 'test' script is
now deprecated, and I'll send an email to the dev list and update the docs to reflect that. This still isn't the final solution, because the module structure is a bit weird, but at least it's a starting point, and everything from here on out is small changes, as opposed to large architectural changes. git-svn-id: https://reductivelabs.com/svn/puppet/trunk@1632 980ebf18-57e1-0310-9a29-db15c13687c0
Diffstat (limited to 'test/executables')
-rwxr-xr-xtest/executables/puppetbin.rb11
-rwxr-xr-xtest/executables/puppetca.rb11
-rwxr-xr-xtest/executables/puppetd.rb11
-rwxr-xr-xtest/executables/puppetmasterd.rb13
-rwxr-xr-xtest/executables/puppetmodule.rb23
5 files changed, 19 insertions, 50 deletions
diff --git a/test/executables/puppetbin.rb b/test/executables/puppetbin.rb
index bde9eaa8b..d7e05a810 100755
--- a/test/executables/puppetbin.rb
+++ b/test/executables/puppetbin.rb
@@ -1,17 +1,10 @@
-if __FILE__ == $0
- $:.unshift '../../lib'
- $:.unshift '..'
- $puppetbase = "../.."
-end
-
require 'puppet'
require 'puppet/server'
require 'puppet/sslcertificates'
-require 'test/unit'
-require 'puppettest.rb'
+require 'puppettest'
class TestPuppetBin < Test::Unit::TestCase
- include ExeTest
+ include PuppetTest::ExeTest
def test_version
output = nil
assert_nothing_raised {
diff --git a/test/executables/puppetca.rb b/test/executables/puppetca.rb
index d21e94e7a..a6ea9aae4 100755
--- a/test/executables/puppetca.rb
+++ b/test/executables/puppetca.rb
@@ -1,17 +1,10 @@
-if __FILE__ == $0
- $:.unshift '../../lib'
- $:.unshift '..'
- $puppetbase = "../.."
-end
-
require 'puppet'
require 'puppet/server'
require 'puppet/sslcertificates'
-require 'test/unit'
-require 'puppettest.rb'
+require 'puppettest'
class TestPuppetCA < Test::Unit::TestCase
- include ExeTest
+ include PuppetTest::ExeTest
def mkcert(hostname)
cert = nil
assert_nothing_raised {
diff --git a/test/executables/puppetd.rb b/test/executables/puppetd.rb
index 700ea5bd3..a1a886a0e 100755
--- a/test/executables/puppetd.rb
+++ b/test/executables/puppetd.rb
@@ -1,18 +1,11 @@
-if __FILE__ == $0
- $:.unshift '../../lib'
- $:.unshift '..'
- $puppetbase = "../.."
-end
-
require 'puppet'
require 'puppet/server'
-require 'test/unit'
-require 'puppettest.rb'
+require 'puppettest'
require 'socket'
require 'facter'
class TestPuppetDExe < Test::Unit::TestCase
- include ExeTest
+ include PuppetTest::ExeTest
def test_normalstart
# start the master
file = startmasterd
diff --git a/test/executables/puppetmasterd.rb b/test/executables/puppetmasterd.rb
index 92a8c6b84..8d6d30875 100755
--- a/test/executables/puppetmasterd.rb
+++ b/test/executables/puppetmasterd.rb
@@ -1,19 +1,12 @@
-if __FILE__ == $0
- $:.unshift '../../lib'
- $:.unshift '..'
- $puppetbase = "../.."
-end
-
require 'puppet'
require 'puppet/server'
require 'puppet/daemon'
-require 'test/unit'
-require 'puppettest.rb'
+require 'puppettest'
require 'socket'
require 'facter'
class TestPuppetMasterD < Test::Unit::TestCase
- include ExeTest
+ include PuppetTest::ExeTest
def getcerts
include Puppet::Daemon
if self.readcerts
@@ -101,7 +94,7 @@ class TestPuppetMasterD < Test::Unit::TestCase
end
def disabled_test_sslconnection
- #file = File.join($puppetbase, "examples", "code", "head")
+ #file = File.join(exampledir, "code", "head")
#startmasterd("--manifest #{file}")
#assert_nothing_raised {
diff --git a/test/executables/puppetmodule.rb b/test/executables/puppetmodule.rb
index cff43a0e5..0752fed14 100755
--- a/test/executables/puppetmodule.rb
+++ b/test/executables/puppetmodule.rb
@@ -1,22 +1,19 @@
-if __FILE__ == $0
- $:.unshift '../../lib'
- $:.unshift '..'
- $puppetbase = "../.."
-end
-
require 'puppet'
require 'puppet/server'
require 'puppet/sslcertificates'
-require 'test/unit'
-require 'puppettest.rb'
-
-$module = File.join($puppetbase, "ext", "module_puppet")
+require 'puppettest'
class TestPuppetModule < Test::Unit::TestCase
- include ExeTest
+ include PuppetTest::ExeTest
+
+
+ def setup
+ super
+ @module = File.join(basedir, "ext", "module_puppet")
+ end
def test_existence
- assert(FileTest.exists?($module), "Module does not exist")
+ assert(FileTest.exists?(@module), "Module does not exist")
end
def test_execution
@@ -29,7 +26,7 @@ class TestPuppetModule < Test::Unit::TestCase
}
output = nil
- cmd = $module
+ cmd = @module
cmd += " --verbose"
#cmd += " --fqdn %s" % fqdn
cmd += " --confdir %s" % Puppet[:confdir]