Sha256: 75bad74e60d46488e66dce7e4bffdaed36ced21d998e53ee8a5550ef4b8d5207

Contents?: true

Size: 1.01 KB

Versions: 17

Compression:

Stored size: 1.01 KB

Contents

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

describe 'Slicehost.get_slices' do
  describe 'success' do

    before(:each) do
      # flavor_id 1: 256 ram, image_id 3: Gentoo 2008.0
      @slice_id = Slicehost[:slices].create_slice(1, 3, 'fog_create_slice').body['id']
    end

    after(:each) do
      eventually(128) do
        Slicehost[:slices].delete_slice(@slice_id)
      end
    end

    it "should return proper attributes" do
      actual = Slicehost[:slices].get_slices.body
      actual['slices'].should be_an(Array)
      slice = actual['slices'].first
      slice['addresses'].should be_a(Array)
      # slice['backup-id'].should be_an(Integer)
      slice['bw-in'].should be_a(Float)
      slice['bw-out'].should be_a(Float)
      slice['flavor-id'].should be_an(Integer)
      slice['id'].should be_an(Integer)
      slice['image-id'].should be_an(Integer)
      slice['name'].should be_an(String)
      slice['progress'].should be_an(Integer)
      slice['status'].should be_an(String)
    end

  end
end

Version data entries

17 entries across 17 versions & 1 rubygems

Version Path
fog-0.0.59 spec/slicehost/requests/get_slices_spec.rb
fog-0.0.58 spec/slicehost/requests/get_slices_spec.rb
fog-0.0.57 spec/slicehost/requests/get_slices_spec.rb
fog-0.0.56 spec/slicehost/requests/get_slices_spec.rb
fog-0.0.55 spec/slicehost/requests/get_slices_spec.rb
fog-0.0.54 spec/slicehost/requests/get_slices_spec.rb
fog-0.0.53 spec/slicehost/requests/get_slices_spec.rb
fog-0.0.52 spec/slicehost/requests/get_slices_spec.rb
fog-0.0.51 spec/slicehost/requests/get_slices_spec.rb
fog-0.0.50 spec/slicehost/requests/get_slices_spec.rb
fog-0.0.49 spec/slicehost/requests/get_slices_spec.rb
fog-0.0.48 spec/slicehost/requests/get_slices_spec.rb
fog-0.0.47 spec/slicehost/requests/get_slices_spec.rb
fog-0.0.46 spec/slicehost/requests/get_slices_spec.rb
fog-0.0.45 spec/slicehost/requests/get_slices_spec.rb
fog-0.0.44 spec/slicehost/requests/get_slices_spec.rb
fog-0.0.43 spec/slicehost/requests/get_slices_spec.rb