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

Update integ test runner to record each configuration separately #4438

Merged
merged 5 commits into from
Feb 21, 2024

Conversation

zelinh
Copy link
Member

@zelinh zelinh commented Feb 9, 2024

Description

Change test runner to record test results each time it finished testing with one configuration.
Generate the component yaml file after both with-security and without-security tests completed because the local cluster logs will only be generated and recorded after process killed.

Issues Resolved

#4435

By submitting this pull request, I confirm that my contribution is made under the terms of the Apache 2.0 license.
For more information on following Developer Certificate of Origin and signing off your commits, please check here.

Signed-off-by: Zelin Hao <zelinhao@amazon.com>
Signed-off-by: Zelin Hao <zelinhao@amazon.com>
Signed-off-by: Zelin Hao <zelinhao@amazon.com>
Copy link

codecov bot commented Feb 9, 2024

Codecov Report

All modified and coverable lines are covered by tests ✅

Comparison is base (5b4f11f) 91.35% compared to head (5be4e89) 92.19%.
Report is 20 commits behind head on main.

Additional details and impacted files
@@            Coverage Diff             @@
##             main    #4438      +/-   ##
==========================================
+ Coverage   91.35%   92.19%   +0.84%     
==========================================
  Files         190      192       +2     
  Lines        6197     6290      +93     
==========================================
+ Hits         5661     5799     +138     
+ Misses        536      491      -45     

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

Signed-off-by: Zelin Hao <zelinhao@amazon.com>
@@ -35,9 +35,10 @@ def setUp(self) -> None:
self.work_dir = Path("test_dir")

@patch("os.path.exists", return_value=True)
@patch("test_workflow.integ_test.integ_test_suite_opensearch.IntegTestSuiteOpenSearch.multi_execute_integtest_sh")
Copy link
Member Author

Choose a reason for hiding this comment

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

The reason this and below tests updated is the behavior of python mock tests.
We were mocking IntegTestSuiteOpenSearch.multi_execute_integtest_sh here so it will apply to all tests intended to run IntegTestSuiteOpenSearch.multi_execute_integtest_sh within this class. Patching this to enforce this mock only applied to this method.

Copy link
Member

@peterzhuamazon peterzhuamazon left a comment

Choose a reason for hiding this comment

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

Hi @zelinh ,

Generally great PR to help resolve the override videos/screenshots issues.

Just a nit on the variable name. Thanks!

stderr,
self.test_artifact_files
)
test_result_data = TestResultData(
Copy link
Member

Choose a reason for hiding this comment

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

Nit: name this local var as test_result_data_obj or test_result_data_local to distinguish from self.test_result_data.

Copy link
Member Author

Choose a reason for hiding this comment

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

Updated the variable name. Please help take a look again. Thanks!

stderr,
self.test_artifact_files
)
test_result_data = TestResultData(
Copy link
Member

Choose a reason for hiding this comment

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

Nit: name this local var as test_result_data_obj or test_result_data_local to distinguish from self.test_result_data.

Signed-off-by: Zelin Hao <zelinhao@amazon.com>
Copy link
Member

@peterzhuamazon peterzhuamazon left a comment

Choose a reason for hiding this comment

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

Great job, @zelinh !

Copy link
Member

@peterzhuamazon peterzhuamazon left a comment

Choose a reason for hiding this comment

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

Great job, @zelinh !

@zelinh zelinh merged commit 549841f into opensearch-project:main Feb 21, 2024
12 checks passed
@zelinh zelinh deleted the update-test-record branch February 21, 2024 23:35
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.

2 participants