2011-06-16 19:28:54 -04:00
|
|
|
Shindo.tests('Fog::Compute[:brightbox] | interface requests', ['brightbox']) do
|
2010-12-06 09:50:59 -05:00
|
|
|
|
|
|
|
tests('success') do
|
|
|
|
|
2010-12-17 19:49:22 -05:00
|
|
|
unless Fog.mocking?
|
2011-06-29 04:17:24 -04:00
|
|
|
server = Fog::Compute[:brightbox].servers.first
|
2010-12-17 19:49:22 -05:00
|
|
|
@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?
|
2011-06-29 04:17:24 -04:00
|
|
|
Fog::Compute[:brightbox].get_interface(@interface_id)
|
2010-12-06 09:50:59 -05:00
|
|
|
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?
|
2011-06-29 04:17:24 -04:00
|
|
|
Fog::Compute[:brightbox].get_interface('int-00000')
|
2010-12-06 09:50:59 -05:00
|
|
|
end
|
|
|
|
|
|
|
|
tests("#get_interface()").raises(ArgumentError) do
|
2010-12-17 19:49:22 -05:00
|
|
|
pending if Fog.mocking?
|
2011-06-29 04:17:24 -04:00
|
|
|
Fog::Compute[:brightbox].get_interface()
|
2010-12-06 09:50:59 -05:00
|
|
|
end
|
|
|
|
end
|
|
|
|
|
|
|
|
end
|