summaryrefslogtreecommitdiffstats
path: root/spec/unit/provider/zone
diff options
context:
space:
mode:
authorRein Henrichs <rein@puppetlabs.com>2010-04-13 16:47:16 -0700
committertest branch <puppet-dev@googlegroups.com>2010-02-17 06:50:53 -0800
commita166d50c3c555a38ae13c1658b9afaefd583cfc9 (patch)
treeeccfda10f430377f539feb6b3bdbc46f9f9bed92 /spec/unit/provider/zone
parentaf521fade9bf64704bab00ddf5d81aa1f987fb7e (diff)
downloadpuppet-a166d50c3c555a38ae13c1658b9afaefd583cfc9.tar.gz
puppet-a166d50c3c555a38ae13c1658b9afaefd583cfc9.tar.xz
puppet-a166d50c3c555a38ae13c1658b9afaefd583cfc9.zip
Fix for #3399 zone type should handle exclusive IP stacks
* corrected missing status * added cloning and support for default router * RH: Fix spec to return accurate value for @resource[:clone] * RH: Add spec for untested install case when @resource[:clone] returns a (non-falsy) value Signed-off-by: Rein Henrichs <rein@puppetlabs.com>
Diffstat (limited to 'spec/unit/provider/zone')
-rwxr-xr-xspec/unit/provider/zone/solaris.rb29
1 files changed, 21 insertions, 8 deletions
diff --git a/spec/unit/provider/zone/solaris.rb b/spec/unit/provider/zone/solaris.rb
index 4f061fef0..0459e5e6c 100755
--- a/spec/unit/provider/zone/solaris.rb
+++ b/spec/unit/provider/zone/solaris.rb
@@ -26,16 +26,29 @@ describe provider_class do
@provider.install
end
- it "should just install if there are no install args" do
- @resource.stubs(:[]).with(:install_args).returns(nil)
- @provider.expects(:zoneadm).with(:install)
- @provider.install
+ describe "when cloning" do
+ before { @resource.stubs(:[]).with(:clone).returns(:clone_argument) }
+
+ it "sohuld clone with the resource's clone attribute" do
+ @provider.expects(:zoneadm).with(:clone, :clone_argument)
+ @provider.install
+ end
end
- it "should add the install args to the command if they exist" do
- @resource.stubs(:[]).with(:install_args).returns("install args")
- @provider.expects(:zoneadm).with(:install, ["install", "args"])
- @provider.install
+ describe "when not cloning" do
+ before { @resource.stubs(:[]).with(:clone).returns(nil)}
+
+ it "should just install if there are no install args" do
+ @resource.stubs(:[]).with(:install_args).returns(nil)
+ @provider.expects(:zoneadm).with(:install)
+ @provider.install
+ end
+
+ it "should add the install args to the command if they exist" do
+ @resource.stubs(:[]).with(:install_args).returns("install args")
+ @provider.expects(:zoneadm).with(:install, ["install", "args"])
+ @provider.install
+ end
end
end