diff options
author | Daniel Pittman <daniel@puppetlabs.com> | 2011-03-10 17:05:19 -0800 |
---|---|---|
committer | Daniel Pittman <daniel@puppetlabs.com> | 2011-03-10 17:05:19 -0800 |
commit | b40021ba4bb1bc328abd54eb2eb7cae7ee82f7cf (patch) | |
tree | 0930a8790d0c103c347d8a7aa5386cfa9de7a51d /spec/unit | |
parent | 6ff2e5cd775c5802113d27f85ed518e25365d563 (diff) | |
parent | 1a55c7a4c225dc022fa640bf46f7bc940013151d (diff) | |
download | puppet-b40021ba4bb1bc328abd54eb2eb7cae7ee82f7cf.tar.gz puppet-b40021ba4bb1bc328abd54eb2eb7cae7ee82f7cf.tar.xz puppet-b40021ba4bb1bc328abd54eb2eb7cae7ee82f7cf.zip |
Merge branch 'feature/next/5479-add-autorequire-for-solaris-zone-dataset' into next
Diffstat (limited to 'spec/unit')
-rwxr-xr-x | spec/unit/type/zone_spec.rb | 20 |
1 files changed, 20 insertions, 0 deletions
diff --git a/spec/unit/type/zone_spec.rb b/spec/unit/type/zone_spec.rb index 726ccc28d..a3e748bde 100755 --- a/spec/unit/type/zone_spec.rb +++ b/spec/unit/type/zone_spec.rb @@ -57,4 +57,24 @@ describe zone do zone.new(:name => "dummy", :path => "/dummy", :ip => "if", :iptype => :exclusive) end + it "should auto-require :dataset entries" do + fs = 'random-pool/some-zfs' + + # ick + provider = stub 'zfs::provider' + provider.stubs(:name).returns(:solaris) + Puppet::Type.type(:zfs).stubs(:defaultprovider).returns(provider) + + catalog = Puppet::Resource::Catalog.new + zfs_instance = Puppet::Type.type(:zfs).new(:name => fs) + catalog.add_resource zfs_instance + + zone_instance = zone.new(:name => "dummy", + :path => "/foo", + :ip => 'en1:1.0.0.0', + :dataset => fs) + catalog.add_resource zone_instance + + catalog.relationship_graph.dependencies(zone_instance).should == [zfs_instance] + end end |