diff options
author | apolcyn <apolcyn@google.com> | 2018-09-27 13:42:36 -0700 |
---|---|---|
committer | GitHub <noreply@github.com> | 2018-09-27 13:42:36 -0700 |
commit | 95ddf53149ff836254eacb4052a0a9ad7b89d403 (patch) | |
tree | 76f679197e94ecd609fa0a300f5e40fbd6f15d65 /tools | |
parent | bc2305caffc8cb9b96a5a2a786ad6aa7c8789604 (diff) | |
parent | c74e7fc668cd7ac30746b4848dcf19510fe4185b (diff) |
Merge pull request #16702 from menghanl/go_google_def_creds_test
Add google default creds go interop tests
Diffstat (limited to 'tools')
-rwxr-xr-x | tools/run_tests/run_interop_tests.py | 28 |
1 files changed, 18 insertions, 10 deletions
diff --git a/tools/run_tests/run_interop_tests.py b/tools/run_tests/run_interop_tests.py index 9bbc2e3e0e..e8d6b59687 100755 --- a/tools/run_tests/run_interop_tests.py +++ b/tools/run_tests/run_interop_tests.py @@ -777,12 +777,14 @@ def cloud_to_prod_jobspec(language, ] if transport_security == 'tls': transport_security_options = ['--use_tls=true'] - elif transport_security == 'google_default_credentials' and language == 'c++': + elif transport_security == 'google_default_credentials' and str( + language) in ['c++', 'go']: transport_security_options = [ '--custom_credentials_type=google_default_credentials' ] else: - print('Invalid transport security option.') + print('Invalid transport security option %s in cloud_to_prod_jobspec.' % + transport_security) sys.exit(1) cmdargs = cmdargs + transport_security_options environ = dict(language.cloud_to_prod_env(), **language.global_env()) @@ -817,8 +819,9 @@ def cloud_to_prod_jobspec(language, cmdline=cmdline, cwd=cwd, environ=environ, - shortname='%s:%s:%s:%s' % (suite_name, language, server_host_nickname, - test_case), + shortname='%s:%s:%s:%s:%s' % + (suite_name, language, server_host_nickname, test_case, + transport_security), timeout_seconds=_TEST_TIMEOUT, flake_retries=4 if args.allow_flakes else 0, timeout_retries=2 if args.allow_flakes else 0, @@ -848,7 +851,8 @@ def cloud_to_cloud_jobspec(language, elif transport_security == 'insecure': interop_only_options += ['--use_tls=false'] else: - print('Invalid transport security option.') + print('Invalid transport security option %s in cloud_to_cloud_jobspec.' + % transport_security) sys.exit(1) client_test_case = test_case @@ -903,8 +907,8 @@ def cloud_to_cloud_jobspec(language, cmdline=cmdline, cwd=cwd, environ=environ, - shortname='cloud_to_cloud:%s:%s_server:%s' % (language, server_name, - test_case), + shortname='cloud_to_cloud:%s:%s_server:%s:%s' % + (language, server_name, test_case, transport_security), timeout_seconds=_TEST_TIMEOUT, flake_retries=4 if args.allow_flakes else 0, timeout_retries=2 if args.allow_flakes else 0, @@ -929,7 +933,8 @@ def server_jobspec(language, elif transport_security == 'insecure': server_cmd += ['--use_tls=false'] else: - print('Invalid transport security option.') + print('Invalid transport security option %s in server_jobspec.' % + transport_security) sys.exit(1) cmdline = bash_cmdline(language.server_cmd(server_cmd)) environ = language.global_env() @@ -1318,7 +1323,7 @@ try: service_account_key_file, transport_security='tls') jobs.append(tls_test_job) - if language == 'c++': + if str(language) in ['c++', 'go']: google_default_creds_test_job = cloud_to_prod_jobspec( language, test_case, @@ -1370,7 +1375,9 @@ try: service_account_key_file, transport_security='tls') jobs.append(tls_test_job) - if language == 'c++': + if str(language) in [ + 'go' + ]: # Add more languages to the list to turn on tests. google_default_creds_test_job = cloud_to_prod_jobspec( language, test_case, @@ -1378,6 +1385,7 @@ try: prod_servers[server_host_nickname], docker_image=docker_images.get( str(language)), + auth=True, manual_cmd_log=client_manual_cmd_log, service_account_key_file=args. service_account_key_file, |