-
Notifications
You must be signed in to change notification settings - Fork 23
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
issue: 4197123: Add Pytest to the workflow of the LogAnalyzer + issue: 4197133: Add Pytest #287
Conversation
plugins/ufm_log_analyzer_plugin/unit_tests/test_ibdiagnet_log_analyzer.py
Outdated
Show resolved
Hide resolved
plugins/ufm_log_analyzer_plugin/unit_tests/test_ibdiagnet_log_analyzer.py
Outdated
Show resolved
Hide resolved
plugins/ufm_log_analyzer_plugin/unit_tests/test_ibdiagnet_log_analyzer.py
Outdated
Show resolved
Hide resolved
plugins/ufm_log_analyzer_plugin/unit_tests/test_ibdiagnet_log_analyzer.py
Outdated
Show resolved
Hide resolved
plugins/ufm_log_analyzer_plugin/unit_tests/test_ibdiagnet_log_analyzer.py
Outdated
Show resolved
Hide resolved
plugins/ufm_log_analyzer_plugin/unit_tests/test_ibdiagnet_log_analyzer.py
Outdated
Show resolved
Hide resolved
plugins/ufm_log_analyzer_plugin/unit_tests/test_ibdiagnet_log_analyzer.py
Outdated
Show resolved
Hide resolved
plugins/ufm_log_analyzer_plugin/unit_tests/test_ibdiagnet_log_analyzer.py
Outdated
Show resolved
Hide resolved
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.
i am missing an example dump file / test inputs to the analyzer to analyze and verifying their response
@drorlevy , these are only unit tests and do not test the entire flow. |
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.
next tasks should include tests for each analyzer
1. Make sure you have `pytest` installed. If not, you can install it using `pip`: | ||
|
||
```bash | ||
pip install pytest |
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.
It should be clear that you use the venv created for the tool, right? otherwise tests might fail due to missing dependencies
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.
added
return TestIBDIAGNETLogAnalyzer(fabric_size_data) | ||
|
||
def test_get_fabric_size(analyzer, fabric_size_data): | ||
# Call the method and check the result |
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.
I don't see the benefit in having this comment
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.
removed
What
Add pytest to log analyzer workflow and add some basics tests for this plugin.
Why ?
In order to test the plugin.
How ?
Pytest session was added to ufm_log_analyzer_ci_workflow.yml
unit_tesst directory was added with two simple unit tests.
Testing ?
Ensure tests passed.
Special triggers
Use the following phrases as comments to trigger different runs
bot:retest
rerun Jenkins CI (to rerun GitHub CI, use "Checks" tab on PR page and rerun all jobs)bot:upgrade
run additional update tests