-
-
Notifications
You must be signed in to change notification settings - Fork 130
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Added mocks for Fog::Storage::OpenStack #262
base: master
Are you sure you want to change the base?
Conversation
1. The class `Mock` was added in this module where needed 2. Added `fail "Mock Not Implemented (#method_name) in: #{__FILE__}:#{__LINE__}"` where mock was not implemented Code is mostly coppied from `Fog::Storage::Rackspace::Mock` with some additional changes.
@@ -1,6 +1,12 @@ | |||
module Fog | |||
module Storage | |||
class OpenStack | |||
class Mock | |||
def delete_container(name) | |||
fail "Mock Not Implemented (#delete_container) in: #{__FILE__}:#{__LINE__}" |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I know you did a copy and paste but you dont need to define this. Once It is not implemented fog will throw the error automatically. =)
So you can skip this change.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Actually, I added this myself to see where was the exception from. Fog only showed sometinhg like Not yet implemented
and I wanted to get the exact location of the not implemented thing.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Gotcha. Maybe you might want to add this to fog-core instead so all providers will have this feature?
Also, does this work with all active maintained ruby versions?
@plribeiro3000 & @krzyczak & @timuralp : Where does this PR stands ? |
@ShamoX As a first look it needs rebase. considering behaviour we would need someone with access to |
The mocking bits in the PR seem fine to me. Adding the additional auth parameters for keystone is probably also fine, but we don't include the tests for it here? Unfortunately, I don't think anyone is actively looking into this, though. |
Mock
was added in this module where neededfail "Mock Not Implemented (#method_name) in: #{__FILE__}:#{__LINE__}"
where mock was not implementedCode is mostly coppied from
Fog::Storage::Rackspace::Mock
.