Skip to content
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

Open
wants to merge 1 commit into
base: master
Choose a base branch
from
Open

Added mocks for Fog::Storage::OpenStack #262

wants to merge 1 commit into from

Conversation

krzyczak
Copy link

  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.

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__}"
Copy link
Member

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.

Copy link
Author

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.

Copy link
Member

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?

@ShamoX
Copy link
Contributor

ShamoX commented Jan 20, 2022

@plribeiro3000 & @krzyczak & @timuralp : Where does this PR stands ?

@plribeiro3000
Copy link
Member

@ShamoX As a first look it needs rebase.

considering behaviour we would need someone with access to openstack to test it as i do not have it.

@timuralp
Copy link
Member

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.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants