Sha256: 06827ddf28507e7fc4f6e23eebaeb24c0ae71a9dba457641f65079a3b140fb93

Contents?: true

Size: 1.96 KB

Versions: 7

Compression:

Stored size: 1.96 KB

Contents

require File.dirname(__FILE__) + '/../../../spec_helper'

describe 'Compute.describe_images' do
  describe 'success' do

    it "should return proper attributes with no params" do
      actual = AWS[:compute].describe_images
      actual.body['requestId'].should be_a(String)
      image = actual.body['imagesSet'].first
      image['architecture'].should be_a(String)
      image['imageId'].should be_a(String)
      image['imageLocation'].should be_a(String)
      image['imageOwnerId'].should be_a(String)
      image['imageState'].should be_a(String)
      image['imageType'].should be_a(String)
      [false, true].should include(image['isPublic'])
      image['kernelId'].should be_a(String) if image['kernelId']
      image['platform'].should be_a(String) if image['platform']
      image['ramdiskId'].should be_a(String) if image['ramdiskId']
      image['rootDeviceName'].should be_a(String) if image['rootDeviceName']
      ["ebs","instance-store"].should include(image['rootDeviceType'])
      image['rootDeviceName'].should be_a(String) if image['rootDeviceName']
    end

    it "should return proper attributes with params" do
      actual = AWS[:compute].describe_images('ImageId' => GENTOO_AMI)
      actual.body['requestId'].should be_a(String)
      image = actual.body['imagesSet'].first
      image['architecture'].should be_a(String)
      image['imageId'].should be_a(String)
      image['imageLocation'].should be_a(String)
      image['imageOwnerId'].should be_a(String)
      image['imageState'].should be_a(String)
      image['imageType'].should be_a(String)
      [false, true].should include(image['isPublic'])
      image['kernelId'].should be_a(String) if image['kernelId']
      image['platform'].should be_a(String) if image['platform']
      image['ramdiskId'].should be_a(String) if image['ramdiskId']
      ["ebs","instance-store"].should include(image['rootDeviceType'])
      image['rootDeviceName'].should be_a(String) if image['rootDeviceName']
    end

  end
end

Version data entries

7 entries across 7 versions & 1 rubygems

Version Path
fog-0.3.6 spec/aws/requests/compute/describe_images_spec.rb
fog-0.3.5 spec/aws/requests/compute/describe_images_spec.rb
fog-0.3.4 spec/aws/requests/compute/describe_images_spec.rb
fog-0.3.3 spec/aws/requests/compute/describe_images_spec.rb
fog-0.3.2 spec/aws/requests/compute/describe_images_spec.rb
fog-0.3.1 spec/aws/requests/compute/describe_images_spec.rb
fog-0.3.0 spec/aws/requests/compute/describe_images_spec.rb