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.
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
zendesk_ticket: new module #8543
base: main
Are you sure you want to change the base?
zendesk_ticket: new module #8543
Changes from all commits
4f532c4
d980342
39d72ba
f020145
a562ea5
b061c82
71fbfa1
7ce3270
e4e5775
7c4b514
39f6b5a
db8218c
43217a4
73fd95f
ab19871
e2eeea4
5b6c41b
a0a3446
1c35ac6
4730cf8
eb6ab56
d06da3a
80d6b4f
3ddbf2d
d339d9c
5edc565
7b54a60
137315b
7c82697
f3d42ab
e110186
c11ff30
a094157
709a902
4c1c35b
9247bc1
ff8dd3a
7e7c81e
43a6733
abb1bcc
ade01ad
54b3eab
File filter
Filter by extension
Conversations
Jump to
There are no files selected for viewing
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.
This code is not wrong, however, for the user of this module, information is lost: why has it failed? what was the error message? They will have an error and have little idea about what happened.
This could be an improvement for another PR, no need to hold this one back over this.
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.
This test only proves that the code handles exceptions, it does not test how the code actually works: that was the idea of mocking.
Since the
requests
library is not being used (to warrant the use ofhttmock
), maybe the answer is a direct mocking of theansible.module_utils.urls.Request
class, or at the very least, of its methods.get()
,.patch()
, etc...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.
Hmm, I guess we need a better mechanism for this. For
open_url
andfetch_url
in the same module there are some unit test frameworks in https://github.com/ansible-collections/community.internal_test_tools/tree/main/tests/unit/utils, but not (yet) for theRequest
class...