Created
October 15, 2013 19:16
-
-
Save juniorz/6997114 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
require 'rubygems' | |
require 'fog' | |
Fog.mock! | |
describe 'Bug' do | |
it 'should not fail' do | |
compute = Fog::Compute.new( | |
:provider => 'openstack', | |
:openstack_username => 'user', | |
:openstack_api_key => 'pass', | |
:openstack_tenant => 'tenant', | |
:openstack_auth_url => 'http://auth/url', | |
) | |
server_def = { | |
:name => 'name', | |
:image_ref => 'image_ref', | |
:flavor_ref => 'flavor', | |
:key_name => 'key_name', | |
:user_data => 'user_data', | |
} | |
server = compute.servers.create(server_def) | |
end | |
end |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
The test fails with a misleading
Missing required arguments: openstack_auth_url
error message. Even adding:openstack_auth_url => 'http://foo/auth'
doesn't fix the problem, because the error is propagated from theFog::Identity
creation (which happens in the mocking code forcreate_server
).