summaryrefslogtreecommitdiffstats
path: root/spec/integration
diff options
context:
space:
mode:
authorNick Lewis <nick@puppetlabs.com>2011-01-05 17:22:30 -0800
committerNick Lewis <nick@puppetlabs.com>2011-01-06 15:19:42 -0800
commitb16e10dba6606b808ef195f4b57f2e8c66cf65ab (patch)
treebdacf054c1e877166217336322050ee03f28d607 /spec/integration
parentfb8509acbd947712cac094a49227d28a16a366aa (diff)
parent19eb1e78e115d10bfb822e510213e4fab9cd2599 (diff)
downloadpuppet-b16e10dba6606b808ef195f4b57f2e8c66cf65ab.tar.gz
puppet-b16e10dba6606b808ef195f4b57f2e8c66cf65ab.tar.xz
puppet-b16e10dba6606b808ef195f4b57f2e8c66cf65ab.zip
Merge branch '2.6.x' into next
Conflicts: Rakefile lib/puppet/resource/type_collection.rb lib/puppet/simple_graph.rb lib/puppet/transaction.rb lib/puppet/transaction/report.rb lib/puppet/util/metric.rb spec/integration/indirector/report/rest_spec.rb spec/spec_specs/runnable_spec.rb spec/unit/configurer_spec.rb spec/unit/indirector_spec.rb spec/unit/transaction/change_spec.rb
Diffstat (limited to 'spec/integration')
-rwxr-xr-xspec/integration/application/apply_spec.rb3
-rwxr-xr-xspec/integration/configurer_spec.rb4
-rwxr-xr-xspec/integration/indirector/catalog/queue_spec.rb5
-rwxr-xr-xspec/integration/network/formats_spec.rb7
-rwxr-xr-xspec/integration/network/server/mongrel_spec.rb3
-rwxr-xr-xspec/integration/provider/mailalias/aliases_spec.rb1
-rwxr-xr-xspec/integration/provider/package_spec.rb4
-rwxr-xr-xspec/integration/provider/service/init_spec.rb12
-rwxr-xr-xspec/integration/resource/catalog_spec.rb3
-rwxr-xr-xspec/integration/transaction/report_spec.rb2
10 files changed, 13 insertions, 31 deletions
diff --git a/spec/integration/application/apply_spec.rb b/spec/integration/application/apply_spec.rb
index 382449e75..876f55568 100755
--- a/spec/integration/application/apply_spec.rb
+++ b/spec/integration/application/apply_spec.rb
@@ -9,8 +9,7 @@ require 'puppet/application/apply'
describe "apply" do
include PuppetSpec::Files
- describe "when applying provided catalogs" do
- confine "PSON library is missing; cannot test applying catalogs" => Puppet.features.pson?
+ describe "when applying provided catalogs", :if => Puppet.features.pson? do
it "should be able to apply catalogs provided in a file in pson" do
file_to_create = tmpfile("pson_catalog")
catalog = Puppet::Resource::Catalog.new
diff --git a/spec/integration/configurer_spec.rb b/spec/integration/configurer_spec.rb
index a0a4d732d..825b6322e 100755
--- a/spec/integration/configurer_spec.rb
+++ b/spec/integration/configurer_spec.rb
@@ -44,8 +44,8 @@ describe Puppet::Configurer do
end
it "should save a correct last run summary" do
- report = Puppet::Transaction::Report.new
- report.stubs(:save)
+ report = Puppet::Transaction::Report.new("apply")
+ Puppet::Transaction::Report.indirection.stubs(:save)
Puppet[:lastrunfile] = tmpfile("lastrunfile")
Puppet[:report] = true
diff --git a/spec/integration/indirector/catalog/queue_spec.rb b/spec/integration/indirector/catalog/queue_spec.rb
index 0f8bd41fb..4581e3062 100755
--- a/spec/integration/indirector/catalog/queue_spec.rb
+++ b/spec/integration/indirector/catalog/queue_spec.rb
@@ -4,10 +4,7 @@ Dir.chdir(File.dirname(__FILE__)) { (s = lambda { |f| File.exist?(f) ? require(f
require 'puppet/resource/catalog'
-
-describe "Puppet::Resource::Catalog::Queue" do
- confine "Missing pson support; cannot test queue" => Puppet.features.pson?
-
+describe "Puppet::Resource::Catalog::Queue", :if => Puppet.features.pson? do
before do
Puppet::Resource::Catalog.indirection.terminus(:queue)
@catalog = Puppet::Resource::Catalog.new
diff --git a/spec/integration/network/formats_spec.rb b/spec/integration/network/formats_spec.rb
index 44d16790a..8eb963e19 100755
--- a/spec/integration/network/formats_spec.rb
+++ b/spec/integration/network/formats_spec.rb
@@ -46,8 +46,7 @@ describe Puppet::Network::FormatHandler.format(:s) do
end
describe Puppet::Network::FormatHandler.format(:pson) do
- describe "when pson is absent" do
- confine "'pson' library is present" => (! Puppet.features.pson?)
+ describe "when pson is absent", :if => (! Puppet.features.pson?) do
before do
@pson = Puppet::Network::FormatHandler.format(:pson)
@@ -58,9 +57,7 @@ describe Puppet::Network::FormatHandler.format(:pson) do
end
end
- describe "when pson is available" do
- confine "Missing 'pson' library" => Puppet.features.pson?
-
+ describe "when pson is available", :if => Puppet.features.pson? do
before do
@pson = Puppet::Network::FormatHandler.format(:pson)
end
diff --git a/spec/integration/network/server/mongrel_spec.rb b/spec/integration/network/server/mongrel_spec.rb
index 45e1f8172..aeaaad6ae 100755
--- a/spec/integration/network/server/mongrel_spec.rb
+++ b/spec/integration/network/server/mongrel_spec.rb
@@ -5,8 +5,7 @@ require 'puppet/network/server'
require 'socket'
describe Puppet::Network::Server do
- describe "when using mongrel" do
- confine "Mongrel is not available" => Puppet.features.mongrel?
+ describe "when using mongrel", :if => Puppet.features.mongrel? do
before :each do
Puppet[:servertype] = 'mongrel'
diff --git a/spec/integration/provider/mailalias/aliases_spec.rb b/spec/integration/provider/mailalias/aliases_spec.rb
index 685cbd29d..bce9374c1 100755
--- a/spec/integration/provider/mailalias/aliases_spec.rb
+++ b/spec/integration/provider/mailalias/aliases_spec.rb
@@ -8,7 +8,6 @@ require 'puppettest/fileparsing'
provider_class = Puppet::Type.type(:mailalias).provider(:aliases)
describe provider_class do
- include PuppetTest
include PuppetTest::FileParsing
include PuppetTest::Support::Utils
diff --git a/spec/integration/provider/package_spec.rb b/spec/integration/provider/package_spec.rb
index 736a34e68..472662d6b 100755
--- a/spec/integration/provider/package_spec.rb
+++ b/spec/integration/provider/package_spec.rb
@@ -6,9 +6,7 @@ describe "Package Provider" do
Puppet::Type.type(:package).providers.each do |name|
provider = Puppet::Type.type(:package).provider(name)
- describe name do
- confine "Provider #{name} is not suitable" => provider.suitable?
-
+ describe name, :if => provider.suitable? do
it "should fail when asked to install an invalid package" do
pending("This test hangs forever with recent versions of RubyGems") if provider.name == :gem
pkg = Puppet::Type.newpackage :name => "nosuch#{provider.name}", :provider => provider.name
diff --git a/spec/integration/provider/service/init_spec.rb b/spec/integration/provider/service/init_spec.rb
index d916ab32a..2e2505bd4 100755
--- a/spec/integration/provider/service/init_spec.rb
+++ b/spec/integration/provider/service/init_spec.rb
@@ -6,25 +6,19 @@ Dir.chdir(File.dirname(__FILE__)) { (s = lambda { |f| File.exist?(f) ? require(f
provider = Puppet::Type.type(:service).provider(:init)
describe provider do
- describe "when running on FreeBSD" do
- confine "Not running on FreeBSD" => (Facter.value(:operatingsystem) == "FreeBSD")
-
+ describe "when running on FreeBSD", :if => (Facter.value(:operatingsystem) == "FreeBSD") do
it "should set its default path to include /etc/init.d and /usr/local/etc/init.d" do
provider.defpath.should == ["/etc/rc.d", "/usr/local/etc/rc.d"]
end
end
- describe "when running on HP-UX" do
- confine "Not running on HP-UX" => (Facter.value(:operatingsystem) == "HP-UX")
-
+ describe "when running on HP-UX", :if => (Facter.value(:operatingsystem) == "HP-UX")do
it "should set its default path to include /sbin/init.d" do
provider.defpath.should == "/sbin/init.d"
end
end
- describe "when not running on FreeBSD or HP-UX" do
- confine "Running on HP-UX or FreeBSD" => (! %w{HP-UX FreeBSD}.include?(Facter.value(:operatingsystem)))
-
+ describe "when not running on FreeBSD or HP-UX", :if => (! %w{HP-UX FreeBSD}.include?(Facter.value(:operatingsystem))) do
it "should set its default path to include /etc/init.d" do
provider.defpath.should == "/etc/init.d"
end
diff --git a/spec/integration/resource/catalog_spec.rb b/spec/integration/resource/catalog_spec.rb
index a3e40249a..21162655e 100755
--- a/spec/integration/resource/catalog_spec.rb
+++ b/spec/integration/resource/catalog_spec.rb
@@ -6,8 +6,7 @@
require File.expand_path(File.dirname(__FILE__) + '/../../spec_helper')
describe Puppet::Resource::Catalog do
- describe "when pson is available" do
- confine "PSON library is missing" => Puppet.features.pson?
+ describe "when pson is available", :if => Puppet.features.pson? do
it "should support pson" do
Puppet::Resource::Catalog.supported_formats.should be_include(:pson)
end
diff --git a/spec/integration/transaction/report_spec.rb b/spec/integration/transaction/report_spec.rb
index 09b029267..c38f31081 100755
--- a/spec/integration/transaction/report_spec.rb
+++ b/spec/integration/transaction/report_spec.rb
@@ -19,7 +19,7 @@ describe Puppet::Transaction::Report do
Facter.stubs(:value).returns "host.domain.com"
- report = Puppet::Transaction::Report.new
+ report = Puppet::Transaction::Report.new("apply")
terminus.expects(:process).with(report)