Sha256: abbb42745c4d141460c44149b2e8a3924b41422308376399305a0ce3652195a9

Contents?: true

Size: 1.45 KB

Versions: 19

Compression:

Stored size: 1.45 KB

Contents

require 'rubygems'
require 'rest_connection'
require 'spec'

describe MultiCloudImageInternal, "exercises the mci internal api" do

  it "should do some stuff" do
    some_image_href = "https://moo1.rightscale.com/api/acct/0/ec2_images/ami-0859bb61?cloud_id=1"
    @mci = MultiCloudImageInternal.create(:name => "123deleteme-test test 1234", :description => "woah")
    @mci2 = MultiCloudImageInternal.create(:name => "1234deleteme-test test 12345", :description => "woah")
    @new_setting = MultiCloudImageCloudSettingInternal.create(:multi_cloud_image_href => @mci.href, :cloud_id => 1, :ec2_image_href => some_image_href, :aws_instance_type => "m1.small")

    @new_st = ServerTemplate.create(:multi_cloud_image_href => @mci.href, :nickname => "123deleteme-test test 123456", :description => "1234")

    @really_new_st = ServerTemplateInternal.new(:href => @new_st.href)
    @really_new_st.add_multi_cloud_image(@mci2.href)
    @really_new_st.set_default_multi_cloud_image(@mci2.href)
    trash = @really_new_st.multi_cloud_images
    trash.class.should == Array
    trash.first.class.should == Hash
    @really_new_st.delete_multi_cloud_image(@mci.href)

    # test clone
    @new_mci_test = @mci2.clone

    # test commit
    @new_mci_test.commit("hello commits world")

  end

  after(:all) do
    @int_new_mci_test = MultiCloudImageInternal.new(:href => @new_mci_test.href)
    @new_st.destroy
    @mci.destroy
    @mci2.destroy
    @int_new_mci_test.destroy
  end
  

end
 

Version data entries

19 entries across 19 versions & 1 rubygems

Version Path
rest_connection-0.1.7 spec/image_jockey.rb
rest_connection-0.1.6 spec/image_jockey.rb
rest_connection-0.1.5 spec/image_jockey.rb
rest_connection-0.1.4 spec/image_jockey.rb
rest_connection-0.1.3 spec/image_jockey.rb
rest_connection-0.1.2 spec/image_jockey.rb
rest_connection-0.1.1 spec/image_jockey.rb
rest_connection-0.1.0 spec/image_jockey.rb
rest_connection-0.0.23 spec/image_jockey.rb
rest_connection-0.0.22 spec/image_jockey.rb
rest_connection-0.0.21 spec/image_jockey.rb
rest_connection-0.0.20 spec/image_jockey.rb
rest_connection-0.0.19 spec/image_jockey.rb
rest_connection-0.0.18 spec/image_jockey.rb
rest_connection-0.0.17 spec/image_jockey.rb
rest_connection-0.0.16 spec/image_jockey.rb
rest_connection-0.0.15 spec/image_jockey.rb
rest_connection-0.0.14 spec/image_jockey.rb
rest_connection-0.0.13 spec/image_jockey.rb