diff --git a/src/test_workflow/benchmark_test/benchmark_test_suite.py b/src/test_workflow/benchmark_test/benchmark_test_suite.py index 7b95d52e33..0c4b7fc496 100644 --- a/src/test_workflow/benchmark_test/benchmark_test_suite.py +++ b/src/test_workflow/benchmark_test/benchmark_test_suite.py @@ -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: diff --git a/tests/tests_test_workflow/test_benchmark_workflow/benchmark_test/test_benchmark_test_suite.py b/tests/tests_test_workflow/test_benchmark_workflow/benchmark_test/test_benchmark_test_suite.py index 6f6c7bbfd7..c6b88bb451 100644 --- a/tests/tests_test_workflow/test_benchmark_workflow/benchmark_test/test_benchmark_test_suite.py +++ b/tests/tests_test_workflow/test_benchmark_workflow/benchmark_test/test_benchmark_test_suite.py @@ -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') @@ -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!\'"') @@ -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\'"') @@ -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"}\' ' @@ -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"}\' ' @@ -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"}\' ' @@ -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"}\' ' @@ -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"}\' ' @@ -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\'"')