summaryrefslogtreecommitdiffstats
path: root/spec/integration
diff options
context:
space:
mode:
authorLuke Kanies <luke@madstop.com>2009-04-02 18:56:53 -0500
committerLuke Kanies <luke@madstop.com>2009-04-02 18:56:53 -0500
commit6e79cc00965a50c44f215fd1e553281cfd2b87c9 (patch)
tree56c496df9ad6ab66dfb16993910eb5ff1c34d065 /spec/integration
parent62dad7a5f87f8d6285650ab1b727819db27cf2a7 (diff)
parentc62c19370bfba881819c1a3d9da2f8e6fb52e5d9 (diff)
downloadpuppet-6e79cc00965a50c44f215fd1e553281cfd2b87c9.tar.gz
puppet-6e79cc00965a50c44f215fd1e553281cfd2b87c9.tar.xz
puppet-6e79cc00965a50c44f215fd1e553281cfd2b87c9.zip
Merge branch '0.24.x'
Conflicts: bin/ralsh lib/puppet/executables/client/certhandler.rb lib/puppet/parser/functions/versioncmp.rb lib/puppet/parser/resource/reference.rb lib/puppet/provider/augeas/augeas.rb lib/puppet/provider/nameservice/directoryservice.rb lib/puppet/provider/ssh_authorized_key/parsed.rb lib/puppet/type.rb lib/puppet/type/file/checksum.rb spec/integration/defaults.rb spec/integration/transaction/report.rb spec/unit/executables/client/certhandler.rb spec/unit/indirector/ssl_rsa/file.rb spec/unit/node/catalog.rb spec/unit/provider/augeas/augeas.rb spec/unit/rails.rb spec/unit/type/ssh_authorized_key.rb spec/unit/type/tidy.rb test/executables/filebucket.rb test/executables/puppetbin.rb
Diffstat (limited to 'spec/integration')
-rwxr-xr-xspec/integration/checksum.rb1
-rwxr-xr-xspec/integration/defaults.rb9
-rwxr-xr-xspec/integration/reports.rb4
-rwxr-xr-xspec/integration/transaction/report.rb5
-rwxr-xr-xspec/integration/type/package.rb7
5 files changed, 23 insertions, 3 deletions
diff --git a/spec/integration/checksum.rb b/spec/integration/checksum.rb
index c94f3e47e..49ae8d2b7 100755
--- a/spec/integration/checksum.rb
+++ b/spec/integration/checksum.rb
@@ -9,6 +9,7 @@ require 'puppet/checksum'
describe Puppet::Checksum, " when using the file terminus" do
before do
+ Puppet.settings.stubs(:use)
Puppet::Checksum.terminus_class = :file
@content = "this is some content"
@sum = Puppet::Checksum.new(@content)
diff --git a/spec/integration/defaults.rb b/spec/integration/defaults.rb
index b3f3a7066..46b5fd64e 100755
--- a/spec/integration/defaults.rb
+++ b/spec/integration/defaults.rb
@@ -5,6 +5,7 @@ require File.dirname(__FILE__) + '/../spec_helper'
require 'puppet/defaults'
describe "Puppet defaults" do
+ include Puppet::Util::Execution
after { Puppet.settings.clear }
describe "when setting the :factpath" do
@@ -83,4 +84,12 @@ describe "Puppet defaults" do
Puppet.settings.element(setting).should be_instance_of(Puppet::Util::Settings::CElement)
end
end
+
+ it "should add /usr/sbin and /sbin to the path if they're not there" do
+ withenv("PATH" => "/usr/bin:/usr/local/bin") do
+ Puppet.settings[:path] = "none" # this causes it to ignore the setting
+ ENV["PATH"].split(File::PATH_SEPARATOR).should be_include("/usr/sbin")
+ ENV["PATH"].split(File::PATH_SEPARATOR).should be_include("/sbin")
+ end
+ end
end
diff --git a/spec/integration/reports.rb b/spec/integration/reports.rb
index 7351c3da1..cc4ae8f4c 100755
--- a/spec/integration/reports.rb
+++ b/spec/integration/reports.rb
@@ -8,6 +8,10 @@ require File.dirname(__FILE__) + '/../spec_helper'
require 'puppet/reports'
describe Puppet::Reports, " when using report types" do
+ before do
+ Puppet.settings.stubs(:use)
+ end
+
it "should load report types as modules" do
Puppet::Reports.report(:store).should be_instance_of(Module)
end
diff --git a/spec/integration/transaction/report.rb b/spec/integration/transaction/report.rb
index 68533b503..b704e56b8 100755
--- a/spec/integration/transaction/report.rb
+++ b/spec/integration/transaction/report.rb
@@ -7,7 +7,10 @@ require File.dirname(__FILE__) + '/../../spec_helper'
describe Puppet::Transaction::Report do
describe "when using the indirector" do
- after { Puppet::Util::Cacher.expire }
+ after do
+ Puppet::Util::Cacher.expire
+ Puppet.settings.stubs(:use)
+ end
it "should be able to delegate to the :processor terminus" do
Puppet::Transaction::Report.indirection.stubs(:terminus_class).returns :processor
diff --git a/spec/integration/type/package.rb b/spec/integration/type/package.rb
index def44ad97..a3d8eb278 100755
--- a/spec/integration/type/package.rb
+++ b/spec/integration/type/package.rb
@@ -9,7 +9,7 @@ describe Puppet::Type.type(:package), "when choosing a default package provider"
end
def provider_name(os)
- {"Debian" => :apt, "Darwin" => :apple, "RedHat" => :up2date, "Fedora" => :yum, "FreeBSD" => :ports, "OpenBSD" => :openbsd, "Solaris" => :sun}[os]
+ {"Ubuntu" => :apt, "Debian" => :apt, "Darwin" => :apple, "RedHat" => :up2date, "Fedora" => :yum, "FreeBSD" => :ports, "OpenBSD" => :openbsd, "Solaris" => :sun}[os]
end
it "should have a default provider" do
@@ -17,6 +17,9 @@ describe Puppet::Type.type(:package), "when choosing a default package provider"
end
it "should choose the correct provider each platform" do
- Puppet::Type.type(:package).defaultprovider.name.should == provider_name(Facter.value(:operatingsystem))
+ unless default_provider = provider_name(Facter.value(:operatingsystem))
+ pending("No default provider specified in this test for %s" % Facter.value(:operatingsystem))
+ end
+ Puppet::Type.type(:package).defaultprovider.name.should == default_provider
end
end