summaryrefslogtreecommitdiffstats
path: root/test/server
diff options
context:
space:
mode:
authorluke <luke@980ebf18-57e1-0310-9a29-db15c13687c0>2005-11-16 17:12:11 +0000
committerluke <luke@980ebf18-57e1-0310-9a29-db15c13687c0>2005-11-16 17:12:11 +0000
commita4562bfba94d18da54ad9560245d0669cc151c76 (patch)
treee923cb50e33737ba06ef6aefce373fbb9f3f97ff /test/server
parent42a9d9a3f8ac698370c36c4ca631e82797e01ece (diff)
downloadpuppet-a4562bfba94d18da54ad9560245d0669cc151c76.tar.gz
puppet-a4562bfba94d18da54ad9560245d0669cc151c76.tar.xz
puppet-a4562bfba94d18da54ad9560245d0669cc151c76.zip
Lots of refactoring, and added the capture_stderr method
git-svn-id: https://reductivelabs.com/svn/puppet/trunk@742 980ebf18-57e1-0310-9a29-db15c13687c0
Diffstat (limited to 'test/server')
-rwxr-xr-xtest/server/authstore.rb8
-rw-r--r--test/server/bucket.rb4
-rwxr-xr-xtest/server/fileserver.rb18
3 files changed, 20 insertions, 10 deletions
diff --git a/test/server/authstore.rb b/test/server/authstore.rb
index c7dfd0978..1875dee07 100755
--- a/test/server/authstore.rb
+++ b/test/server/authstore.rb
@@ -15,14 +15,6 @@ require 'puppettest.rb'
class TestAuthStore < Test::Unit::TestCase
include TestPuppet
- def setup
- if __FILE__ == $0
- Puppet[:loglevel] = :debug
- end
-
- super
- end
-
def mkstore
store = nil
assert_nothing_raised {
diff --git a/test/server/bucket.rb b/test/server/bucket.rb
index 5d45eedb2..ac418484e 100644
--- a/test/server/bucket.rb
+++ b/test/server/bucket.rb
@@ -21,8 +21,10 @@ class TestBucket < Test::Unit::TestCase
# iterate across all of the files
files.each { |file|
spin
+ tempdir = tempfile()
+ Dir.mkdir(tempdir)
name = File.basename(file)
- tmppath = File.join(tmpdir,name)
+ tmppath = File.join(tempdir,name)
@@tmpfiles << tmppath
# copy the files to our tmp directory so we can modify them...
diff --git a/test/server/fileserver.rb b/test/server/fileserver.rb
index 6712c30b7..f6037f17d 100755
--- a/test/server/fileserver.rb
+++ b/test/server/fileserver.rb
@@ -226,7 +226,7 @@ class TestFileServer < Test::Unit::TestCase
# verify we can mount /, which is what local file servers will
# normally do
- def test_mountroot
+ def test_zmountroot
server = nil
assert_nothing_raised {
server = Puppet::Server::FileServer.new(
@@ -247,6 +247,11 @@ class TestFileServer < Test::Unit::TestCase
}
assert(list =~ pattern)
+ assert_nothing_raised {
+ list = server.list("/root" + testdir, true, false)
+ }
+
+ assert(list =~ pattern)
end
# verify that we're correctly recursing the right number of levels
@@ -688,6 +693,17 @@ class TestFileServer < Test::Unit::TestCase
list = nil
end
+ # Verify that we get converted to the right kind of string
+ def test_mountstring
+ mount = nil
+ name = "yaytest"
+ path = tmpdir()
+ assert_nothing_raised {
+ mount = Puppet::Server::FileServer::Mount.new(name, path)
+ }
+
+ assert_equal(name + ":" + path, mount.to_s)
+ end
end
# $Id$