From 47005aa20199455e8cea7679b0c40efbebe473e4 Mon Sep 17 00:00:00 2001 From: Markus Roberts Date: Wed, 4 Aug 2010 09:08:30 -0700 Subject: Maint -- tests need to respect RFC-952 We had a test that assumed hostnames would only consist of letters; by RFC-952 they are also allowed to contain digits and '-'s. The test failed on such machines. --- test/certmgr/support.rb | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/test/certmgr/support.rb b/test/certmgr/support.rb index 3138c94d7..060c458d8 100755 --- a/test/certmgr/support.rb +++ b/test/certmgr/support.rb @@ -89,8 +89,9 @@ class TestCertSupport < Test::Unit::TestCase should_path = Puppet[:hostprivkey] dir, file = File.split(should_path) - newfile = file.sub(/^([a-z.]+)\./) { $1.upcase + "."} + newfile = file.sub(/^([-a-z.0-9]+)\./) { $1.upcase + "."} upper_path = File.join(dir, newfile) +p upper_path File.open(upper_path, "w") { |f| f.print key.to_s } user = CertUser.new -- cgit