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

vdk-test-utils: add cli_assert_output_contains #1540

Merged
merged 3 commits into from
Jan 24, 2023

Conversation

antoniivanov
Copy link
Collaborator

@antoniivanov antoniivanov commented Jan 23, 2023

We may need to verify that something exists in output or some other verification. In the same time we'd like to make use of cli_assert more deetailed output in case of an error (prints output logs, thread dump of exception).

This is extending cli_assert method to support passing custom message. And adding new method cli_assert_output_contains which would test if output string contains substring. As this is frequently used verification method in a lot of plugins.

Testing Done: new unit tests

Signed-off-by: Antoni Ivanov aivanov@vmware.com

Copy link
Collaborator

@murphp15 murphp15 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks good

We may need to verify that something exists in output or some other
verification. In the same time we'd like to make use of cli_assert more
deetailed output in case of an error (prints output logs, thread dump of
exception).

This is extending `cli_assert` method to support passing custom message
And addng new method cli_assert_output_contains which would test if
output string contains substring. As this is frequently used
verification method in a lot of plugins.

new unit tests

Signed-off-by: Antoni Ivanov <aivanov@vmware.com>
…util_funcs.py

Co-authored-by: Andy <87700128+doks5@users.noreply.github.com>
@antoniivanov antoniivanov enabled auto-merge (squash) January 24, 2023 12:07
@antoniivanov antoniivanov merged commit 0300f7f into main Jan 24, 2023
@antoniivanov antoniivanov deleted the person/aivanov/vdk-test-utils branch January 24, 2023 12:15
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

4 participants