Sha256: b70b1a6558562cb9de39bf84060717a83e1a13cbae04f5e5448bd2570db2b9fc

Contents?: true

Size: 1.1 KB

Versions: 9

Compression:

Stored size: 1.1 KB

Contents

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

describe 'Rackspace::Servers.create_server' do
  describe 'success' do

    after(:each) do
      eventually(128) do
        servers.delete_server(@server_id)
      end
    end

    it "should return proper attributes" do
      # flavor 1 = 256, image 3 = gentoo 2008.0
      actual = servers.create_server(1, 3, 'name').body['server']
      @server_id = actual['id']
      actual['addresses'].should be_a(Hash)
      actual['addresses']['private'].should be_an(Array)
      actual['addresses']['private'].first.should be_a(String)
      actual['addresses']['public'].should be_an(Array)
      actual['addresses']['public'].first.should be_a(String)
      actual['adminPass'].should be_a(String)
      actual['flavorId'].should be_an(Integer)
      actual['hostId'].should be_a(String)
      actual['id'].should be_an(Integer)
      actual['imageId'].should be_an(Integer)
      actual['metadata'].should be_a(Hash)
      actual['name'].should be_a(String)
      # actual['progress'].should be_an(Integer)
      actual['status'].should be_a(String)
    end

  end
end

Version data entries

9 entries across 9 versions & 1 rubygems

Version Path
fog-0.0.40 spec/rackspace/requests/servers/create_server_spec.rb
fog-0.0.39 spec/rackspace/requests/servers/create_server_spec.rb
fog-0.0.38 spec/rackspace/requests/servers/create_server_spec.rb
fog-0.0.37 spec/rackspace/requests/servers/create_server_spec.rb
fog-0.0.36 spec/rackspace/requests/servers/create_server_spec.rb
fog-0.0.35 spec/rackspace/requests/servers/create_server_spec.rb
fog-0.0.34 spec/rackspace/requests/servers/create_server_spec.rb
fog-0.0.33 spec/rackspace/requests/servers/create_server_spec.rb
fog-0.0.32 spec/rackspace/requests/servers/create_server_spec.rb