summaryrefslogtreecommitdiffstats
path: root/spec/integration
diff options
context:
space:
mode:
authorNick Lewis <nick@puppetlabs.com>2011-01-05 15:54:00 -0800
committerNick Lewis <nick@puppetlabs.com>2011-01-05 15:54:00 -0800
commit19eb1e78e115d10bfb822e510213e4fab9cd2599 (patch)
treed5068dfd7a3890c7b5961779c87681b930cf3144 /spec/integration
parentcc1f2b39a65e8b74c8e59a2bf7d8f47a35985ee4 (diff)
parent83ac3e789ddc8dbf40c93460032474870fb16c54 (diff)
Merge branch '2.6.next' into 2.6.x
Diffstat (limited to 'spec/integration')
-rwxr-xr-xspec/integration/application/apply_spec.rb3
-rwxr-xr-xspec/integration/indirector/catalog/queue_spec.rb5
-rw-r--r--spec/integration/indirector/report/rest_spec.rb30
-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, 24 insertions, 46 deletions
diff --git a/spec/integration/application/apply_spec.rb b/spec/integration/application/apply_spec.rb
index 840917eff..363aa3469 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/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/indirector/report/rest_spec.rb b/spec/integration/indirector/report/rest_spec.rb
index fdc218975..5b5b2ddd8 100644
--- a/spec/integration/indirector/report/rest_spec.rb
+++ b/spec/integration/indirector/report/rest_spec.rb
@@ -64,33 +64,29 @@ describe "Report REST Terminus" do
it "should be able to send a report to the server" do
@report.expects(:save)
- report = Puppet::Transaction::Report.new
+ report = Puppet::Transaction::Report.new("apply")
resourcemetrics = {
- :total => 12,
- :out_of_sync => 20,
- :applied => 45,
- :skipped => 1,
- :restarted => 23,
- :failed_restarts => 1,
- :scheduled => 10
+ "total" => 12,
+ "out_of_sync" => 20,
+ "applied" => 45,
+ "skipped" => 1,
+ "restarted" => 23,
+ "failed_restarts" => 1,
+ "scheduled" => 10
}
report.add_metric(:resources, resourcemetrics)
timemetrics = {
- :resource1 => 10,
- :resource2 => 50,
- :resource3 => 40,
- :resource4 => 20,
+ "resource1" => 10,
+ "resource2" => 50,
+ "resource3" => 40,
+ "resource4" => 20,
}
report.add_metric(:times, timemetrics)
- report.add_metric(
- :changes,
-
- :total => 20
- )
+ report.add_metric(:changes, "total" => 20)
report.save
end
diff --git a/spec/integration/network/formats_spec.rb b/spec/integration/network/formats_spec.rb
index e6cf28abb..d141abf00 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 cc90773e6..c2815b565 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 0511205f2..1bce13f90 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 0a3d47a80..da2b70409 100755
--- a/spec/integration/resource/catalog_spec.rb
+++ b/spec/integration/resource/catalog_spec.rb
@@ -6,8 +6,7 @@
require 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 eed7acaa9..e7d952eb2 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)