aboutsummaryrefslogtreecommitdiffhomepage
path: root/tools/run_tests/run_interop_tests.py
diff options
context:
space:
mode:
authorGravatar Menghan Li <menghanl@google.com>2018-09-25 15:42:00 -0700
committerGravatar Menghan Li <menghanl@google.com>2018-09-27 11:05:36 -0700
commitc74e7fc668cd7ac30746b4848dcf19510fe4185b (patch)
treebb68ab21a96c72ed4db35d99f4b9d9d0eabd17b0 /tools/run_tests/run_interop_tests.py
parente5fb49bc666834287019fec34a224144ffc290af (diff)
add google default creds go tests
cloud_to_prod_auth google_default_creds tests are for c++
Diffstat (limited to 'tools/run_tests/run_interop_tests.py')
-rwxr-xr-xtools/run_tests/run_interop_tests.py28
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,