summaryrefslogtreecommitdiffstats
path: root/test
diff options
context:
space:
mode:
authormpalmer <mpalmer@980ebf18-57e1-0310-9a29-db15c13687c0>2006-12-31 05:45:53 +0000
committermpalmer <mpalmer@980ebf18-57e1-0310-9a29-db15c13687c0>2006-12-31 05:45:53 +0000
commit16f7980ef4d65a89007079f15c04744b5bedfc65 (patch)
treeff2bcbb2ce2504c2e7e0ca18cbfa74e53a124806 /test
parente4843f1e5bf177577252a06598c5e84940e719ef (diff)
Switch the run-lock to use Pidlock instead of the ad-hoc code
git-svn-id: https://reductivelabs.com/svn/puppet/trunk@2002 980ebf18-57e1-0310-9a29-db15c13687c0
Diffstat (limited to 'test')
-rwxr-xr-xtest/client/master.rb34
-rwxr-xr-xtest/server/runner.rb1
2 files changed, 3 insertions, 32 deletions
diff --git a/test/client/master.rb b/test/client/master.rb
index dd92c290e..48a8dc80a 100755
--- a/test/client/master.rb
+++ b/test/client/master.rb
@@ -180,6 +180,7 @@ class TestMasterClient < Test::Unit::TestCase
end
def test_disable
+ FileUtils.mkdir_p(Puppet[:statedir])
manifest = mktestmanifest
master = mkmaster(manifest)
@@ -220,40 +221,9 @@ class TestMasterClient < Test::Unit::TestCase
end
- # Make sure the client correctly locks itself
- def test_locking
- manifest = mktestmanifest
-
- master = nil
-
- # First test with a networked master
- client = Puppet::Client::MasterClient.new(
- :Server => "localhost"
- )
-
- assert_nothing_raised do
- client.lock do
- pid = nil
- assert(client.locked?, "Client is not locked")
- assert(client.lockpid.is_a?(Integer), "PID #{client.lockpid} is, um, not a pid")
- end
- end
- assert(! client.locked?)
-
- # Now test with a local client
- client = mkclient
-
- assert_nothing_raised do
- client.lock do
- pid = nil
- assert(! client.locked?, "Local client is locked")
- end
- end
- assert(! client.locked?)
- end
-
# Make sure non-string facts don't make things go kablooie
def test_nonstring_facts
+ FileUtils.mkdir_p(Puppet[:statedir])
# Add a nonstring fact
Facter.add("nonstring") do
setcode { 1 }
diff --git a/test/server/runner.rb b/test/server/runner.rb
index 2d904f504..e102250fe 100755
--- a/test/server/runner.rb
+++ b/test/server/runner.rb
@@ -33,6 +33,7 @@ class TestServerRunner < Test::Unit::TestCase
end
def test_runner
+ FileUtils.mkdir_p(Puppet[:statedir])
Puppet[:ignoreschedules] = false
# Okay, make our manifest
file = tempfile()