-
Notifications
You must be signed in to change notification settings - Fork 5.5k
Changes for BUG opened: 56995 #56996
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
Conversation
@bfdacosta thank you for contribution! Could you please also write a regression tests for your changes? |
DmitryKuzmenko, greetings! Can you point me out a regression test that is needed. Any example code for that ? Thanks ! |
@bfdacosta there are unit tests for the zabbix module in salt/tests/unit/modules/test_zabbix.py. You could create a test which mocks a version response of 4.3 and validate that the json is generated in the expected format. This could then be copied and modified for the 4.4 version and expected response. |
Thank you @mchugh19 . |
I will produce the test. |
@bfdacosta I think you can mock it with stubs just checking the logic goes in a proper ways with different stubbed version values. Also you can add links to the corresponding documentation to the stubs to make it easily understandable. I don't think we have to test this particular change with a real zabbix servers. |
Test added to the code. |
@DmitryKuzmenko let me know if anything else still needed for merge! Thanks! |
@bfdacosta yes, could you please update your branch and re-run pre-commit on it? There're some issues
|
Fix mediatype_create and mediatype_get usage since new API 4.4. - Added a apiinfo_version call to check the API version when dealing with mediatype_create and get. - Changed the attribute called from "description" to "name", when API version is greater or equal to 4.4. changed both mediatype_create and mediatype_get.
c87d6f0
to
8788fc4
Compare
@DmitryKuzmenko Greetings!!! All problems solved. Thanks! |
What does this PR do?
Fix mediatype_create and mediatype_get usage since new API 4.4.
dealing with mediatype_create and get.
when API version is greater or equal to 4.4. changed both
mediatype_create and mediatype_get.
What issues does this PR fix or reference?
Fixes #56995
Commits signed with GPG?
No
Please review Salt's Contributing Guide for best practices.
See GitHub's page on GPG signing for more information about signing commits with GPG.