Fix internal server error when using dynamic client#29
Open
durera wants to merge 1 commit intonolar:mainfrom
Open
Fix internal server error when using dynamic client#29durera wants to merge 1 commit intonolar:mainfrom
durera wants to merge 1 commit intonolar:mainfrom
Conversation
This file contains hidden or 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
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
See the provided test which demonstrates the problem:
tests/dynamicclient/test_dynamicclient.pyAfter the change, the expected errors are surfaced, the DynamicClient is happy, and the test passes
I contemplated a larger change to relocate the error classes to avoid the circular dependency issue and allow the imports to be defined at the module level, but didn't want to mess with the codebase too much, and this way made the fix a much smaller/safer change to make.
I tried to set up the new test in such a way it could be the basis for more DynamicClient tests in future with re-usable fixtures mirroring how I'm using kmock in my own testing (except instead of directly using DynamicClient I have a whole other layer of indirection ontop because I'm launching ansible playbooks with ansible-runner, and they are using DynamicClient under the covers).