Skip to content

Commit

Permalink
Update workload parameters to be passed as json (#3715)
Browse files Browse the repository at this point in the history
Signed-off-by: Rishabh Singh <[email protected]>
  • Loading branch information
rishabh6788 authored Jul 10, 2023
1 parent 1525fb7 commit 13a77b6
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
2 changes: 1 addition & 1 deletion src/test_workflow/benchmark_test/benchmark_test_suite.py
Original file line number Diff line number Diff line change
Expand Up @@ -42,7 +42,7 @@ def __init__(

if args.workload_params:
logging.info(f"Workload Params are {args.workload_params}")
self.command += f" --workload-params \"{args.workload_params}\""
self.command += f" --workload-params '{args.workload_params}'"

if args.user_tag:
user_tag = f"--user-tag=\"{args.user_tag}\""
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -44,7 +44,7 @@ def test_execute_security_enabled(self) -> None:
'verify_certs:false,basic_auth_user:\'admin\',basic_auth_password:\'admin\'"')

def test_execute_default_with_optional_args(self) -> None:
TestBenchmarkTestSuite.setUp(self, "/home/test/benchmark.ini", "key1:value1,key2:value2", "number_of_replicas:1", True)
TestBenchmarkTestSuite.setUp(self, "/home/test/benchmark.ini", "key1:value1,key2:value2", "{\"number_of_replicas\":\"1\"}", True)
with patch("subprocess.check_call") as mock_check_call:
self.benchmark_test_suite.execute()
self.assertEqual(mock_check_call.call_count, 1)
Expand All @@ -53,5 +53,5 @@ def test_execute_default_with_optional_args(self) -> None:
'opensearchproject/opensearch-benchmark:latest execute-test '
'--workload=nyc_taxis '
'--pipeline=benchmark-only --target-hosts=abc.com '
'--workload-params "number_of_replicas:1" '
'--workload-params \'{"number_of_replicas":"1"}\' '
'--user-tag="key1:value1,key2:value2" --telemetry node-stats --client-options="timeout:300"')

0 comments on commit 13a77b6

Please sign in to comment.