Please review pull request #414: (#11860) fix specs that fail on windows opened by (cprice-puppet)

Description:

  • Opened: Thu Jan 26 23:26:05 UTC 2012
  • Based on: puppetlabs:master (8411ab3c8a6b2a03581b5dc2f912e718601df729)
  • Requested merge: cprice-puppet:bug/master/11860-LANG-environment-var (cb85859d3be89c63b67edc358db40006e724ca3f)

Diff follows:

diff --git a/spec/unit/daemon_spec.rb b/spec/unit/daemon_spec.rb
index da79537..8b42b66 100755
--- a/spec/unit/daemon_spec.rb
+++ b/spec/unit/daemon_spec.rb
@@ -16,7 +16,7 @@ def lockfile_path
   end
 end
 
-describe Puppet::Daemon do
+describe Puppet::Daemon unless Puppet.features.microsoft_windows? do
   before do
     @agent = Puppet::Agent.new(TestClient.new)
     @daemon = Puppet::Daemon.new
diff --git a/spec/unit/provider/exec/posix_spec.rb b/spec/unit/provider/exec/posix_spec.rb
index 4b26896..7b07297 100755
--- a/spec/unit/provider/exec/posix_spec.rb
+++ b/spec/unit/provider/exec/posix_spec.rb
@@ -113,7 +113,7 @@ def make_exe
       @logs.map {|l| "#{l.level}: #{l.message}" }.should == ["warning: Overriding environment setting 'WHATEVER' with '/foo'"]
     end
 
-    describe "locale settings" do
+    describe "posix locale settings" unless Puppet.features.microsoft_windows? do
       # a sentinel value that we can use to emulate what locale environment variables might be set to on an international
       # system.
       lang_sentinel_value = "es_ES.UTF-8"
diff --git a/spec/unit/util_spec.rb b/spec/unit/util_spec.rb
index 4a9520a..e6c8370 100755
--- a/spec/unit/util_spec.rb
+++ b/spec/unit/util_spec.rb
@@ -365,16 +365,16 @@ def process_status(exitstatus)
       end
     end
 
-    describe "#execute" do
-      # build up a printf-style string that contains an OS-specific command to get the value of an environment variable
+    describe "#execute (posix locale)" unless Puppet.features.microsoft_windows?  do
+      # build up a printf-style string that contains a command to get the value of an environment variable
       # from the operating system.  We can substitute into this with the names of the desired environment variables later.
-      get_env_var_cmd = Puppet.features.microsoft_windows? ? 'cmd.exe /c "echo %%%s%%"' : 'echo $%s'
+      get_env_var_cmd = 'echo $%s'
 
       # a sentinel value that we can use to emulate what locale environment variables might be set to on an international
       # system.
       lang_sentinel_value = "es_ES.UTF-8"
       # a temporary hash that contains sentinel values for each of the locale environment variables that we override in
-      # "execute"
+      # "execdaemoute"
       locale_sentinel_env = {}
       Puppet::Util::POSIX_LOCALE_ENV_VARS.each { |var| locale_sentinel_env[var] = lang_sentinel_value }
 

    

--
You received this message because you are subscribed to the Google Groups "Puppet Developers" group.
To post to this group, send email to [email protected].
To unsubscribe from this group, send email to [email protected].
For more options, visit this group at http://groups.google.com/group/puppet-dev?hl=en.

Reply via email to