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
|
|
|
|
|
2011-09-29 05:15:03 -04:00
|
|
|
tests("#get_interface('#{@interface_id}')") do
|
2010-12-17 19:49:22 -05:00
|
|
|
pending if Fog.mocking?
|
2011-09-29 05:15:03 -04:00
|
|
|
result = Fog::Compute[:brightbox].get_interface(@interface_id)
|
2012-02-06 05:49:18 -05:00
|
|
|
formats(Brightbox::Compute::Formats::Full::INTERFACE, false) { result }
|
2010-12-06 09:50:59 -05:00
|
|
|
end
|
|
|
|
|
|
|
|
end
|
|
|
|
|
|
|
|
tests('failure') do
|
|
|
|
|
2011-08-18 04:54:28 -04:00
|
|
|
tests("#get_interface('int-00000')").raises(Excon::Errors::NotFound) 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
|