mirror of
https://github.com/fog/fog.git
synced 2022-11-09 13:51:43 -05:00
more rackspace specs
This commit is contained in:
parent
2548a4d4a6
commit
5249bf4a54
2 changed files with 41 additions and 6 deletions
|
@ -3,10 +3,33 @@ require File.dirname(__FILE__) + '/../../../spec_helper'
|
||||||
describe 'Rackspace::Servers.list_servers_detail' do
|
describe 'Rackspace::Servers.list_servers_detail' do
|
||||||
describe 'success' do
|
describe 'success' do
|
||||||
|
|
||||||
|
before(:each) do
|
||||||
|
# flavor 1 = 256, image 3 = gentoo 2008.0
|
||||||
|
@server_id = servers.create_server(1, 3).body['server']['id']
|
||||||
|
end
|
||||||
|
|
||||||
|
after(:each) do
|
||||||
|
eventually(128) do
|
||||||
|
servers.delete_server(@server_id)
|
||||||
|
end
|
||||||
|
end
|
||||||
|
|
||||||
it "should return proper attributes" do
|
it "should return proper attributes" do
|
||||||
pending
|
actual = servers.list_servers_detail.body['servers'].first
|
||||||
p servers.list_servers_detail
|
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['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
|
end
|
||||||
end
|
end
|
||||||
|
|
|
@ -3,10 +3,22 @@ require File.dirname(__FILE__) + '/../../../spec_helper'
|
||||||
describe 'Rackspace::Servers.list_servers' do
|
describe 'Rackspace::Servers.list_servers' do
|
||||||
describe 'success' do
|
describe 'success' do
|
||||||
|
|
||||||
|
before(:each) do
|
||||||
|
# flavor 1 = 256, image 3 = gentoo 2008.0
|
||||||
|
@server_id = servers.create_server(1, 3).body['server']['id']
|
||||||
|
end
|
||||||
|
|
||||||
|
after(:each) do
|
||||||
|
eventually(128) do
|
||||||
|
servers.delete_server(@server_id)
|
||||||
|
end
|
||||||
|
end
|
||||||
|
|
||||||
it "should return proper attributes" do
|
it "should return proper attributes" do
|
||||||
pending
|
actual = servers.list_servers.body['servers'].first
|
||||||
p servers.list_servers
|
actual['id'].should be_an(Integer)
|
||||||
|
actual['name'].should be_a(String)
|
||||||
end
|
end
|
||||||
|
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
|
Loading…
Reference in a new issue