summaryrefslogtreecommitdiffstats
path: root/spec/integration
diff options
context:
space:
mode:
authorJames Turnbull <james@lovedthanlost.net>2009-04-06 11:45:23 +1000
committerJames Turnbull <james@lovedthanlost.net>2009-04-06 11:45:23 +1000
commit3aedfd8bbcefcdb92af57e4661a360be9aee2716 (patch)
treef44e6bd75fca39f2fd6c87e5d0b6e84ee14dd8e0 /spec/integration
parent173b5f0a162d8dd7f72e1cab257069bc65382960 (diff)
parenta677e26eb1452c08d7724047a18e50f4a654d2cd (diff)
downloadpuppet-3aedfd8bbcefcdb92af57e4661a360be9aee2716.tar.gz
puppet-3aedfd8bbcefcdb92af57e4661a360be9aee2716.tar.xz
puppet-3aedfd8bbcefcdb92af57e4661a360be9aee2716.zip
Merge branch 'master' of git://reductivelabs.com/puppet
Diffstat (limited to 'spec/integration')
-rwxr-xr-xspec/integration/bin/puppetmasterd.rb3
-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
6 files changed, 25 insertions, 4 deletions
diff --git a/spec/integration/bin/puppetmasterd.rb b/spec/integration/bin/puppetmasterd.rb
index 447344472..b5a3f96da 100755
--- a/spec/integration/bin/puppetmasterd.rb
+++ b/spec/integration/bin/puppetmasterd.rb
@@ -50,7 +50,8 @@ describe "puppetmasterd" do
args = arguments + addl_args
- output = %x{puppetmasterd #{args}}.chomp
+ bin = File.join(File.dirname(__FILE__), "..", "..", "..", "sbin", "puppetmasterd")
+ output = %x{#{bin} #{args}}.chomp
end
def stop
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