Added mocks for Fog::Storage::OpenStack#262
Added mocks for Fog::Storage::OpenStack#262krzyczak wants to merge 1 commit intofog:masterfrom thebigsofa:fog_mocks
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.
| class OpenStack | ||
| class Mock | ||
| def delete_container(name) | ||
| fail "Mock Not Implemented (#delete_container) in: #{__FILE__}:#{__LINE__}" |
There was a problem hiding this comment.
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.
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.
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. |
Mockwas 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.