Skip to content

Commit

Permalink
Pin OSB docker version to 1.6.0
Browse files Browse the repository at this point in the history
Signed-off-by: Rishabh Singh <[email protected]>
  • Loading branch information
rishabh6788 committed Jun 22, 2024
1 parent aefb420 commit 570651e
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 10 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 @@ -46,7 +46,7 @@ def __init__(
self.command = f'docker run --name docker-container-{self.args.stack_suffix}'
if self.args.benchmark_config:
self.command += f" -v {args.benchmark_config}:/opensearch-benchmark/.benchmark/benchmark.ini"
self.command += f" opensearchproject/opensearch-benchmark:latest execute-test --workload={self.args.workload} " \
self.command += f" opensearchproject/opensearch-benchmark:1.6.0 execute-test --workload={self.args.workload} " \
f"--pipeline=benchmark-only --target-hosts={endpoint}"

if self.args.workload_params:
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -47,7 +47,7 @@ def test_execute_default(self, mock_check_call: Mock) -> None:
test_suite.execute()
self.assertEqual(mock_check_call.call_count, 2)
self.assertEqual(test_suite.command,
f'docker run --name docker-container-{test_suite.args.stack_suffix} opensearchproject/opensearch-benchmark:latest execute-test '
f'docker run --name docker-container-{test_suite.args.stack_suffix} opensearchproject/opensearch-benchmark:1.6.0 execute-test '
f'--workload=nyc_taxis --pipeline=benchmark-only --target-hosts=abc.com:80 --client-options="timeout:300"')

@patch('test_workflow.benchmark_test.benchmark_test_suite.subprocess.check_call')
Expand All @@ -61,7 +61,7 @@ def test_execute_security_enabled_version_212_or_greater(self, mock_convert: Moc
mock_check_call.assert_called_with(
f"docker rm docker-container-{test_suite.args.stack_suffix}", cwd=os.getcwd(), shell=True)
self.assertEqual(test_suite.command,
f'docker run --name docker-container-{test_suite.args.stack_suffix} opensearchproject/opensearch-benchmark:latest execute-test'
f'docker run --name docker-container-{test_suite.args.stack_suffix} opensearchproject/opensearch-benchmark:1.6.0 execute-test'
f' --workload=nyc_taxis --pipeline=benchmark-only '
f'--target-hosts=abc.com:443 '
f'--client-options="timeout:300,use_ssl:true,verify_certs:false,basic_auth_user:\'admin\',basic_auth_password:\'myStrongPassword123!\'"')
Expand All @@ -77,7 +77,7 @@ def test_execute_security_enabled(self, mock_convert: Mock, mock_check_call: Moc
mock_check_call.assert_called_with(
f"docker rm docker-container-{test_suite.args.stack_suffix}", cwd=os.getcwd(), shell=True)
self.assertEqual(test_suite.command,
f'docker run --name docker-container-{test_suite.args.stack_suffix} opensearchproject/opensearch-benchmark:latest execute-test '
f'docker run --name docker-container-{test_suite.args.stack_suffix} opensearchproject/opensearch-benchmark:1.6.0 execute-test '
'--workload=nyc_taxis --pipeline=benchmark-only '
'--target-hosts=abc.com:443 --client-options="timeout:300,use_ssl:true,'
'verify_certs:false,basic_auth_user:\'admin\',basic_auth_password:\'admin\'"')
Expand All @@ -99,7 +99,7 @@ def test_execute_default_with_optional_args(self, mock_convert: Mock, mock_check
self.assertEqual(test_suite.command,
f'docker run --name docker-container-{test_suite.args.stack_suffix} -v /home/test/benchmark.ini:'
'/opensearch-benchmark/.benchmark/benchmark.ini '
'opensearchproject/opensearch-benchmark:latest execute-test '
'opensearchproject/opensearch-benchmark:1.6.0 execute-test '
'--workload=nyc_taxis '
'--pipeline=benchmark-only --target-hosts=abc.com:80 '
'--workload-params \'{"number_of_replicas":"1"}\' '
Expand All @@ -120,7 +120,7 @@ def test_execute_default_with_no_telemetry_params(self, mock_convert: Mock, mock
self.assertEqual(test_suite.command,
f'docker run --name docker-container-{test_suite.args.stack_suffix} -v /home/test/benchmark.ini:'
'/opensearch-benchmark/.benchmark/benchmark.ini '
'opensearchproject/opensearch-benchmark:latest execute-test '
'opensearchproject/opensearch-benchmark:1.6.0 execute-test '
'--workload=nyc_taxis '
'--pipeline=benchmark-only --target-hosts=abc.com:80 '
'--workload-params \'{"number_of_replicas":"1"}\' '
Expand All @@ -142,7 +142,7 @@ def test_execute_with_test_procedure_params(self, mock_convert: Mock, mock_check
self.assertEqual(test_suite.command,
f'docker run --name docker-container-{test_suite.args.stack_suffix} -v /home/test/benchmark.ini:'
'/opensearch-benchmark/.benchmark/benchmark.ini '
'opensearchproject/opensearch-benchmark:latest execute-test '
'opensearchproject/opensearch-benchmark:1.6.0 execute-test '
'--workload=nyc_taxis '
'--pipeline=benchmark-only --target-hosts=abc.com:80 '
'--workload-params \'{"number_of_replicas":"1"}\' '
Expand All @@ -166,7 +166,7 @@ def test_execute_with_include_exclude_params(self, mock_convert: Mock, mock_chec
self.assertEqual(test_suite.command,
f'docker run --name docker-container-{test_suite.args.stack_suffix} -v /home/test/benchmark.ini:'
'/opensearch-benchmark/.benchmark/benchmark.ini '
'opensearchproject/opensearch-benchmark:latest execute-test '
'opensearchproject/opensearch-benchmark:1.6.0 execute-test '
'--workload=nyc_taxis '
'--pipeline=benchmark-only --target-hosts=abc.com:80 '
'--workload-params \'{"number_of_replicas":"1"}\' '
Expand All @@ -189,7 +189,7 @@ def test_execute_with_all_benchmark_optional_params(self, mock_convert: Mock) ->
f"docker rm docker-container-{test_suite.args.stack_suffix}", cwd=os.getcwd(), shell=True)
self.assertEqual(test_suite.command, f'docker run --name docker-container-{test_suite.args.stack_suffix} -v /home/test/benchmark.ini:'
'/opensearch-benchmark/.benchmark/benchmark.ini '
'opensearchproject/opensearch-benchmark:latest execute-test '
'opensearchproject/opensearch-benchmark:1.6.0 execute-test '
'--workload=nyc_taxis '
'--pipeline=benchmark-only --target-hosts=abc.com:80 '
'--workload-params \'{"number_of_replicas":"1"}\' '
Expand All @@ -212,7 +212,7 @@ def test_execute_cluster_endpoint(self, mock_convert: Mock, mock_check_call: Moc
mock_check_call.assert_called_with(
f"docker rm docker-container-{test_suite.args.stack_suffix}", cwd=os.getcwd(), shell=True)
self.assertEqual(test_suite.command,
f'docker run --name docker-container-{test_suite.args.stack_suffix} opensearchproject/opensearch-benchmark:latest execute-test '
f'docker run --name docker-container-{test_suite.args.stack_suffix} opensearchproject/opensearch-benchmark:1.6.0 execute-test '
'--workload=nyc_taxis --pipeline=benchmark-only '
'--target-hosts=abc.com:443 --client-options="timeout:300,use_ssl:true,'
'verify_certs:false,basic_auth_user:\'admin\',basic_auth_password:\'admin\'"')
Expand Down

0 comments on commit 570651e

Please sign in to comment.