[Pkg-puppet-devel] [SCM] Puppet packaging for Debian branch, master, updated. debian/0.24.7-1-98-gf19c0e5
Luke Kanies
luke at madstop.com
Wed Apr 8 21:48:19 UTC 2009
The following commit has been merged in the master branch:
commit 0c16426a772c85b0ab45bfd4c3ba5189ace2d6b2
Author: Luke Kanies <luke at madstop.com>
Date: Sat Feb 28 07:55:56 2009 +0000
Fixing broken 0.24.x tests in test/.
These tests once again largely were caused
by /usr/sbin not being in the path and by
~ not being writable.
The only tests still failing are Rails tests,
and my guess is that they're all failing because
of the recent work by Brice. They should probably
just be removed.
Signed-off-by: Luke Kanies <luke at madstop.com>
diff --git a/test/executables/filebucket.rb b/test/executables/filebucket.rb
index 4916307..f479c15 100755
--- a/test/executables/filebucket.rb
+++ b/test/executables/filebucket.rb
@@ -12,12 +12,15 @@ class TestFileBucketExe < Test::Unit::TestCase
include PuppetTest::ExeTest
def test_local
+ basedir = tempfile()
+ FileUtils.mkdir_p(basedir)
+
bucket = tempfile
file = tempfile
text = "somet ext"
md5 = Digest::MD5.hexdigest(text)
File.open(file, "w") { |f| f.print text }
- out = %x{filebucket --bucket #{bucket} backup #{file}}
+ out = %x{filebucket --confdir #{basedir} --vardir #{basedir} --bucket #{bucket} backup #{file}}
outfile, outmd5 = out.chomp.split(": ")
@@ -35,12 +38,12 @@ class TestFileBucketExe < Test::Unit::TestCase
assert_equal(text, newtext, "did not get correct file from md5 sum")
- out = %x{filebucket --bucket #{bucket} get #{md5}}
+ out = %x{filebucket --confdir #{basedir} --vardir #{basedir} --bucket #{bucket} get #{md5}}
assert_equal(0, $?, "filebucket did not run successfully")
assert_equal(text, out, "did not get correct text back from filebucket")
File.open(file, "w") { |f| f.puts "some other txt" }
- out = %x{filebucket --bucket #{bucket} restore #{file} #{md5}}
+ out = %x{filebucket --confdir #{basedir} --vardir #{basedir} --bucket #{bucket} restore #{file} #{md5}}
assert_equal(0, $?, "filebucket did not run successfully")
assert_equal(text, File.read(file), "file was not restored")
end
diff --git a/test/executables/puppetbin.rb b/test/executables/puppetbin.rb
index 08329ef..631b3b2 100755
--- a/test/executables/puppetbin.rb
+++ b/test/executables/puppetbin.rb
@@ -72,7 +72,7 @@ class TestPuppetBin < Test::Unit::TestCase
end
File.open(manifest, "w") do |f|
f.puts "#!#{env} puppet
- file { '#{path}': ensure => file }"
+ exec { '/bin/touch #{path}': }"
end
File.chmod(0755, manifest)
diff --git a/test/lib/puppettest.rb b/test/lib/puppettest.rb
index 63f8121..7fb98ef 100755
--- a/test/lib/puppettest.rb
+++ b/test/lib/puppettest.rb
@@ -166,6 +166,9 @@ module PuppetTest
end
def setup
+ unless ENV["PATH"].split(File::PATH_SEPARATOR).include?("/usr/sbin")
+ ENV["PATH"] += File::PATH_SEPARATOR + "/usr/sbin"
+ end
@memoryatstart = Puppet::Util.memory
if defined? @@testcount
@@testcount += 1
--
Puppet packaging for Debian
More information about the Pkg-puppet-devel
mailing list