-
Notifications
You must be signed in to change notification settings - Fork 92
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
Fix nonetype
by adding ensure_required_libs
to get_conn_params
in postgres.py
#253
Conversation
…ty.postgresql * 'main' of https://github.com/ansible-collections/community.postgresql: Release 2.1.4 commit add new docsite links feature (ansible-collections#248)
added `ensure_required_libs(module)` to `get_conn_params` to ensure a meaningful error is thrown when psycopg2 is not installed. Without this change the error was; `AttributeError: 'NoneType' object has no attribute '__version__'`. Fixes ansible-collections#252
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.
@jchancojr thanks for fixing this!
…rather than just the definition for clarity.
Hi, @Andersson007. Went with your suggestion and added comments above the Thanks! |
hey @Andersson007 does this pr show conflicts for you? it does for me, but not @jchancojr also, Jim can't see the actual error log output of the tests, so he can't debug any failures :( |
@hunleyd i see no conflicts
Do you mean he can't click the checks to see details? |
@jchancojr thanks! |
…led explicitly in each module.
please take a look at this unit test. I think it should be adjusted a little bit (i.e. remove everything related to connect_to_db) |
New to Example:
In the Could use some guidance here probably as I'm not convinced I've done this correctly. |
ah, sorry, i wanted to say remove stuff related to |
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.
LGTM @jchancojr thanks for fixing this!
Guidance from me:
If any questions, just ask |
pytest + unit testing principles are good things to learn. The collection requirements (to be in the package) say that a collection must be covered by units or integration tests.
|
…ty.postgresql * 'main' of https://github.com/ansible-collections/community.postgresql: Remove changelog fragment for doc change. Update changelog to reflect doc changes for postgresql_owner.py Change documentation to be more clear that the changes take place for the entire cluster/instance rather than just a single DB. Fix `nonetype` by adding `ensure_required_libs` to `get_conn_params` in postgres.py (ansible-collections#253) Update unit tests (ansible-collections#258) docs: announce the new matrix pg room (ansible-collections#254)
SUMMARY
Fix
nonetype
by addingensure_required_libs
toget_conn_params
in postgres.pyFixes #252
ISSUE TYPE
COMPONENT NAME
All