Sha256: a1e9aa2f4fb57c48ac28979fe646c5e1e272d879b7c22c35fdc61cbd19c3dd8e

Contents?: true

Size: 1.23 KB

Versions: 6

Compression:

Stored size: 1.23 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)
  end

  after(:all) do
    @new_st.destroy
    #@mci.destroy
    #@mci2.destroy
  end
  

end
 

Version data entries

6 entries across 6 versions & 1 rubygems

Version Path
rest_connection-0.0.12 spec/image_jockey.rb
rest_connection-0.0.11 spec/image_jockey.rb
rest_connection-0.0.10 spec/image_jockey.rb
rest_connection-0.0.9 spec/image_jockey.rb
rest_connection-0.0.8 spec/image_jockey.rb
rest_connection-0.0.7 spec/image_jockey.rb