summaryrefslogtreecommitdiffstats
path: root/test/util
diff options
context:
space:
mode:
authorluke <luke@980ebf18-57e1-0310-9a29-db15c13687c0>2007-06-18 18:09:22 +0000
committerluke <luke@980ebf18-57e1-0310-9a29-db15c13687c0>2007-06-18 18:09:22 +0000
commit30ebbc90d396fa929fa1072dfd157e380c4668b5 (patch)
tree6c9b3931912835d46668eced1b280462177b62eb /test/util
parentac05442d35c2c76a912baff6b13edd240b1cca21 (diff)
downloadpuppet-30ebbc90d396fa929fa1072dfd157e380c4668b5.tar.gz
puppet-30ebbc90d396fa929fa1072dfd157e380c4668b5.tar.xz
puppet-30ebbc90d396fa929fa1072dfd157e380c4668b5.zip
Applying the patch by wyvern from #662. This should hopefully kill the client hanging problems.
git-svn-id: https://reductivelabs.com/svn/puppet/trunk@2604 980ebf18-57e1-0310-9a29-db15c13687c0
Diffstat (limited to 'test/util')
-rwxr-xr-xtest/util/utiltest.rb15
1 files changed, 9 insertions, 6 deletions
diff --git a/test/util/utiltest.rb b/test/util/utiltest.rb
index 689bb7629..419d9820e 100755
--- a/test/util/utiltest.rb
+++ b/test/util/utiltest.rb
@@ -337,6 +337,13 @@ class TestPuppetUtil < Test::Unit::TestCase
orig_lc_all = ENV["LC_ALL"]
orig_lc_messages = ENV["LC_MESSAGES"]
orig_language = ENV["LANGUAGE"]
+
+ cleanup do
+ ENV["LANG"] = orig_lang
+ ENV["LC_ALL"] = orig_lc_all
+ ENV["LC_MESSAGES"] = orig_lc_messages
+ ENV["LANGUAGE"] = orig_lc_messages
+ end
# Mmm, we love gettext(3)
ENV["LANG"] = "en_US"
@@ -345,17 +352,13 @@ class TestPuppetUtil < Test::Unit::TestCase
ENV["LANGUAGE"] = "en_US"
%w{LANG LC_ALL LC_MESSAGES LANGUAGE}.each do |env|
- assert_equal 'C',
+ assert_equal('C',
Puppet::Util.execute(['ruby', '-e', "print ENV['#{env}']"]),
- "Environment var #{env} wasn't set to 'C'"
+ "Environment var #{env} wasn't set to 'C'")
assert_equal 'en_US', ENV[env], "Environment var #{env} not set back correctly"
end
- ENV["LANG"] = orig_lang
- ENV["LC_ALL"] = orig_lc_all
- ENV["LC_MESSAGES"] = orig_lc_messages
- ENV["LANGUAGE"] = orig_lc_messages
end
# Check whether execute() accepts strings in addition to arrays.