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

Python Integ Test Updates #483

Merged
merged 11 commits into from
Jan 16, 2024
Merged

Conversation

lewijacn
Copy link
Collaborator

@lewijacn lewijacn commented Jan 11, 2024

Description

This change contains improvements and refactors to the integration test script we have currently. It fixes some indentation errors that occurred at some point with the OSB test which was causing some indexes to not get checked. It also adds additional logic for the OSB test to add proper parameters for the ./runTestBenchmarks script. Also included is a refactoring to not try and delete a given index after every test which can cause some flakiness between tests if using the proxy endpoint. Instead we use a unique index for each test now, and let the test delete the index if it chooses.

Issues Resolved

[List any issues this PR will resolve]

Is this a backport? If so, please add backport PR # and/or commits #

Testing

[Please provide details of testing done: unit testing, integration testing and manual testing]

Check List

  • New functionality includes testing
    • All tests pass, including unit test, integration test and doctest
  • New functionality has been documented
  • Commits are signed per the DCO using --signoff

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.

Copy link

codecov bot commented Jan 11, 2024

Codecov Report

All modified and coverable lines are covered by tests ✅

Comparison is base (c7c1da3) 73.51% compared to head (9180521) 73.55%.
Report is 1 commits behind head on main.

Additional details and impacted files
@@             Coverage Diff              @@
##               main     #483      +/-   ##
============================================
+ Coverage     73.51%   73.55%   +0.04%     
- Complexity     1180     1182       +2     
============================================
  Files           124      124              
  Lines          4886     4886              
  Branches        439      439              
============================================
+ Hits           3592     3594       +2     
+ Misses          999      998       -1     
+ Partials        295      294       -1     
Flag Coverage Δ
unittests 73.55% <ø> (+0.04%) ⬆️

Flags with carried forward coverage won't be shown. Click here to find out more.

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

Signed-off-by: Tanner Lewis <[email protected]>
Copy link
Contributor

@okhasawn okhasawn left a comment

Choose a reason for hiding this comment

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

LGTM!


def test_0001_index(self):
# This test will verify that an index will be created (then deleted) on the target cluster when one is created
# on the source cluster by going through the proxy first. It will verify that the traffic is captured by the
# proxy and that the traffic reaches the source cluster, replays said traffic to the target cluster by the
# replayer.

index_name = f"test_0001_{self.unique_id}"
Copy link
Contributor

Choose a reason for hiding this comment

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

I very much appreciate this change so that concurrent build jobs can be running the same test without causing any conflicts.

@lewijacn lewijacn merged commit bd39484 into opensearch-project:main Jan 16, 2024
8 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants