2010-12-06 09:50:59 -05:00
|
|
|
Shindo.tests('Brightbox::Compute | interface requests', ['brightbox']) do
|
|
|
|
|
|
|
|
tests('success') do
|
|
|
|
|
2010-12-17 19:49:22 -05:00
|
|
|
unless Fog.mocking?
|
|
|
|
server = Brightbox[:compute].servers.first
|
|
|
|
@interface_id = server.interfaces.first["id"]
|
|
|
|
end
|
|
|
|
|
2010-12-06 09:50:59 -05:00
|
|
|
tests("#get_interface('#{@interface_id}')").formats(Brightbox::Compute::Formats::Full::INTERFACE) do
|
2010-12-17 19:49:22 -05:00
|
|
|
pending if Fog.mocking?
|
2010-12-06 09:50:59 -05:00
|
|
|
Brightbox[:compute].get_interface(@interface_id)
|
|
|
|
end
|
|
|
|
|
|
|
|
end
|
|
|
|
|
|
|
|
tests('failure') do
|
|
|
|
|
|
|
|
tests("#get_interface('int-00000')").raises(Excon::Errors::Forbidden) do
|
2010-12-17 19:49:22 -05:00
|
|
|
pending if Fog.mocking?
|
2010-12-06 09:50:59 -05:00
|
|
|
Brightbox[:compute].get_interface('int-00000')
|
|
|
|
end
|
|
|
|
|
|
|
|
tests("#get_interface()").raises(ArgumentError) do
|
2010-12-17 19:49:22 -05:00
|
|
|
pending if Fog.mocking?
|
2010-12-06 09:50:59 -05:00
|
|
|
Brightbox[:compute].get_interface()
|
|
|
|
end
|
|
|
|
end
|
|
|
|
|
|
|
|
end
|