Skip to content

Commit

Permalink
Addressed PR Comments
Browse files Browse the repository at this point in the history
Signed-off-by: Owais Kazi <owaiskazi19@gmail.com>
  • Loading branch information
owaiskazi19 committed Aug 27, 2021
1 parent f6747b5 commit 49067a2
Showing 1 changed file with 6 additions and 6 deletions.
12 changes: 6 additions & 6 deletions bundle-workflow/src/perf_test.py
Original file line number Diff line number Diff line change
Expand Up @@ -9,25 +9,25 @@
from test_workflow.perf_test_suite import PerformanceTestSuite

parser = argparse.ArgumentParser(description="Test an OpenSearch Bundle")
parser.add_argument('manifest', type=argparse.FileType('r'), help="Manifest file.")
parser.add_argument('--bundle-manifest', type=argparse.FileType('r'), help="Bundle Manifest file.")
parser.add_argument('--stack', dest='stack', help='Stack name for performance test')
parser.add_argument('config', type=argparse.FileType('r'), help="Config file.")
parser.add_argument('--config', type=argparse.FileType('r'), help="Config file.")
args = parser.parse_args()

manifest = BundleManifest.from_file(args.manifest)
manifest = BundleManifest.from_file(args.bundle_manifest)

config = yaml.load(args.config, Loader=yaml.FullLoader)


def get_repo_url():
def get_infra_repo_url():
if "GITHUB_TOKEN" in os.environ:
return "https://${GITHUB_TOKEN}@github.com/opensearch-project/opensearch-infra.git"
return "https://github.com/opensearch-project/opensearch-infra.git"


os.chdir(os.getcwd())
current_workspace = os.path.join(os.getcwd(), 'infra')
cloned_repo = GitRepository(get_repo_url(), 'main', current_workspace)
cloned_repo = GitRepository(get_infra_repo_url(), 'main', current_workspace)
security = False
for component in manifest.components:
if component.name == 'security':
Expand All @@ -42,6 +42,6 @@ def get_repo_url():
os.chdir(current_workspace)
perf_test_suite = PerformanceTestSuite(manifest, endpoint, security)
perf_test_suite.execute()
except:
finally:
os.chdir(current_workspace)
perf_cluster.destroy()

0 comments on commit 49067a2

Please sign in to comment.