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 unit tests for avi API utils #58382

Open
wants to merge 3 commits into
base: devel
from

Conversation

Projects
None yet
5 participants
@chaitanyaavi
Copy link
Contributor

commented Jun 26, 2019

SUMMARY

Added unit tests for avi API utils

ISSUE TYPE
  • Feature Pull Request
COMPONENT NAME
  • test/units/module_utils/network/avi/test_avi_api_utils.py
ADDITIONAL INFORMATION

@ansibot

This comment has been minimized.

Copy link
Contributor

commented Jun 26, 2019

The test ansible-test sanity --test pylint [explain] failed with 1 error:

test/units/module_utils/network/avi/test_avi_api_utils.py:573:0: syntax-error Missing parentheses in call to 'print'. Did you mean print(elem)? (<unknown>, line 573)

The test ansible-test sanity --test compile --python 3.5 [explain] failed with 1 error:

test/units/module_utils/network/avi/test_avi_api_utils.py:573:22: SyntaxError: print elem

The test ansible-test sanity --test compile --python 3.6 [explain] failed with 1 error:

test/units/module_utils/network/avi/test_avi_api_utils.py:573:22: SyntaxError: print elem

The test ansible-test sanity --test compile --python 3.7 [explain] failed with 1 error:

test/units/module_utils/network/avi/test_avi_api_utils.py:573:22: SyntaxError: print elem

The test ansible-test sanity --test compile --python 3.8 [explain] failed with 1 error:

test/units/module_utils/network/avi/test_avi_api_utils.py:573:19: SyntaxError: print elem

click here for bot help

@ansibot ansibot added needs_revision and removed core_review labels Jun 26, 2019

@grastogi23
Copy link
Contributor

left a comment

+shipit

@jillr jillr removed the needs_triage label Jun 27, 2019

@ansibot ansibot added the stale_ci label Jul 11, 2019

'capacity_estimation': False,
'fewest_tasks_feedback_delay': 10,
'_last_modified': '1471377748747040',
'cloud_ref': 'https://10.10.25.42/api/cloud/cloud-afe8bf2c-9821-4272-9bc6-67634c84bec9',

This comment has been minimized.

Copy link
@Qalthos

Qalthos Jul 17, 2019

Contributor

Please don't use routable IP addresses in tests, even if they are never used. Documentation ranges (https://tools.ietf.org/html/rfc5737) help ensure that this is clear to readers.

diff = avi_obj_cmp(obj, existing_obj)
assert diff
x = not diff
assert not x

This comment has been minimized.

Copy link
@Qalthos

Qalthos Jul 17, 2019

Contributor

I'm really not sure what this is supposed to do. You've proved that diff is truthy above, and now you're asserting that whatever object diff is is symmetric over not, but I'm not sure why. You don't seem to be making any claims about the contents of diff, so I don't quite see what the value of this test is.

@ansibot ansibot added needs_revision and removed core_review labels Jul 17, 2019

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.