X-Git-Url: https://git.adam-barratt.org.uk/?a=blobdiff_plain;ds=sidebyside;f=3rdparty%2Fmodules%2Fnova%2Fspec%2Ftype%2Fnova_aggregate_spec.rb;fp=3rdparty%2Fmodules%2Fnova%2Fspec%2Ftype%2Fnova_aggregate_spec.rb;h=0000000000000000000000000000000000000000;hb=6e1426dc77fb4e5d51f07c187c6f2219431dc31e;hp=dc5db974afbe6b2daacb0f95cdc4d51785ae1866;hpb=87423ba664cd5f2bb462ebadd08b1a90d0fe1c8d;p=mirror%2Fdsa-puppet.git diff --git a/3rdparty/modules/nova/spec/type/nova_aggregate_spec.rb b/3rdparty/modules/nova/spec/type/nova_aggregate_spec.rb deleted file mode 100644 index dc5db974a..000000000 --- a/3rdparty/modules/nova/spec/type/nova_aggregate_spec.rb +++ /dev/null @@ -1,66 +0,0 @@ -# run with: rspec spec/type/nova_aggregate_spec.rb - -require 'spec_helper' - - -describe Puppet::Type.type(:nova_aggregate) do - before :each do - @provider_class = described_class.provide(:simple) do - mk_resource_methods - def create; end - def delete; end - def exists?; get(:ensure) != :absent; end - def flush; end - def self.instances; []; end - end - end - - it "should be able to create an instance" do - described_class.new(:name => 'agg0').should_not be_nil - end - - it "should be able to create an more complex instance" do - described_class.new(:name => 'agg0', - :availability_zone => 'myzone', - :metadata => "a=b, c=d", - :hosts => "host1").should_not be_nil - end - - it "should be able to create an more complex instance with multiple hosts" do - described_class.new(:name => 'agg0', - :availability_zone => 'myzone', - :metadata => "a=b, c=d", - :hosts => "host1, host2").should_not be_nil - end - - it "should be able to create a instance and have the default values" do - c = described_class.new(:name => 'agg0') - c[:name].should == "agg0" - c[:availability_zone].should == nil - c[:metadata].should == nil - c[:hosts].should == nil - end - - it "should return the given values" do - c = described_class.new(:name => 'agg0', - :availability_zone => 'myzone', - :metadata => " a = b , c= d ", - :hosts => " host1, host2 ") - c[:name].should == "agg0" - c[:availability_zone].should == "myzone" - c[:metadata].should == {"a" => "b", "c" => "d"} - c[:hosts].should == ["host1" , "host2"] - end - - it "should return the given values" do - c = described_class.new(:name => 'agg0', - :availability_zone => "", - :metadata => "", - :hosts => "") - c[:name].should == "agg0" - c[:availability_zone].should == "" - c[:metadata].should == {} - c[:hosts].should == [] - end - -end