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

Add test to run opensearch benchmark and compare doc counts #369

Merged
merged 9 commits into from
Nov 9, 2023

Conversation

okhasawn
Copy link
Contributor

Description

This PR adds a test to the E2E script where it runs Opensearch Benchmark on the solution then compares the document count on both source and target clusters

Issues Resolved

Migrations-1409

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.

@codecov
Copy link

codecov bot commented Oct 24, 2023

Codecov Report

Merging #369 (d76caf8) into main (6a09ae0) will decrease coverage by 0.10%.
The diff coverage is n/a.

@@             Coverage Diff              @@
##               main     #369      +/-   ##
============================================
- Coverage     63.64%   63.55%   -0.10%     
+ Complexity      718      715       -3     
============================================
  Files            82       82              
  Lines          3298     3298              
  Branches        303      303              
============================================
- Hits           2099     2096       -3     
- Misses         1011     1014       +3     
  Partials        188      188              
Flag Coverage Δ
unittests 63.55% <ø> (-0.10%) ⬇️

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

see 2 files with indirect coverage changes

test/tests.py Outdated Show resolved Hide resolved
test/tests.py Outdated Show resolved Hide resolved
test/tests.py Outdated
@@ -200,3 +221,37 @@ def test_0006_invalidIncorrectUri(self):
incorrectUri = "/_cluster/incorrectUri"
response = requests.get(f'{self.proxy_endpoint}{incorrectUri}', auth=self.auth, verify=False)
self.assertEqual(response.status_code, HTTPStatus.METHOD_NOT_ALLOWED)

def test_0007_OSB(self):
cmd = "docker ps | grep 'migrations/migration_console:latest' | awk '{print $NF}'"
Copy link
Collaborator

@sumobrian sumobrian Oct 25, 2023

Choose a reason for hiding this comment

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

I recommend using docker ps --format="{{.ID}}" --filter name=migration-console and avoiding the pipes. This will give you the container ID.

test/tests.py Outdated Show resolved Hide resolved
@gregschohn gregschohn dismissed their stale review November 9, 2023 19:30

As per bjpres's approval

@okhasawn okhasawn merged commit e481768 into opensearch-project:main Nov 9, 2023
7 of 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.

3 participants