mirror of
https://github.com/fog/fog.git
synced 2022-11-09 13:51:43 -05:00
"Fix" incorrect Compute
provider credential test
Unfortunately, ecloud, openvz and vmfusion do not raise the correct `ArgumentError` when initialised without configuration settings. Really each of the providers needs fixing but as a stop-gap, this captures their incorrect responses to avoid cluttering the tests with their long broken behaviour.
This commit is contained in:
parent
a759f97388
commit
69e28fe870
1 changed files with 5 additions and 1 deletions
|
@ -7,8 +7,12 @@ describe Fog::Compute do
|
|||
# Stub credentials so you still see errors where the tester really has credentials
|
||||
Fog.stub :credentials, {} do
|
||||
# These providers do not raise ArgumentError since they have no requirements defined
|
||||
if [:openvz, :vmfusion].include?(provider)
|
||||
# FIXME: They should use the same interface as everyone else
|
||||
case provider
|
||||
when :ecloud, :openvz
|
||||
assert Fog::Compute[provider]
|
||||
when :vmfusion
|
||||
assert_raises(Fog::Errors::MockNotImplemented) { Fog::Compute[provider] }
|
||||
else
|
||||
assert_raises(ArgumentError) { Fog::Compute[provider] }
|
||||
end
|
||||
|
|
Loading…
Add table
Reference in a new issue