mirror of
https://github.com/fog/fog.git
synced 2022-11-09 13:51:43 -05:00
a759f97388
`require "opennebula"` fails when downstream tries to require `xmlrpc` which is not included within the main `fog` dependencies. The problem is that the `LoadError` was being trapped by `Fog::SevicesMixin#new` so it was reporting that the OpenNebula provider did not offer the service. This then handles the `Fog::Errors::LoadError` in all the shindo tests that halted the run. These tests will be pending unless `opennebula` is installed.
19 lines
773 B
Ruby
19 lines
773 B
Ruby
Shindo.tests('Fog::Compute[:opennebula] | networks collection', ['opennebula']) do
|
|
begin
|
|
networks = Fog::Compute[:opennebula].networks
|
|
rescue Fog::Errors::LoadError
|
|
pending
|
|
end
|
|
|
|
tests('The networks collection') do
|
|
test('should be a kind of Fog::Compute::OpenNebula::Networks') { networks.kind_of? Fog::Compute::OpenNebula::Networks }
|
|
tests('should be able to reload itself').succeeds { networks.reload }
|
|
tests('should be able to get a model') do
|
|
tests('all').succeeds { networks.all }
|
|
tests('by instance id').succeeds { networks.get networks.first.id }
|
|
tests('by filter').succeeds { networks.get_by_filter ({ :id => networks.first.id }) }
|
|
tests('by name').succeeds { networks.get_by_name ("fogtest") }
|
|
end
|
|
end
|
|
|
|
end
|