teach interop script about new tests

pull/4383/head
Jan Tattermusch 9 years ago
parent fa20ebc631
commit 5c7a1c861f
  1. 77
      tools/run_tests/run_interop_tests.py

@ -52,6 +52,11 @@ _DEFAULT_SERVER_PORT=8080
# supported by C core SslCredentials instead.
_SSL_CERT_ENV = { 'SSL_CERT_FILE':'/usr/local/share/grpc/roots.pem' }
_SKIP_COMPRESSION = ['large_compressed_unary',
'server_compressed_streaming']
_SKIP_ADVANCED = ['custom_metadata', 'status_code_and_message',
'unimplemented_method']
class CXXLanguage:
@ -73,7 +78,10 @@ class CXXLanguage:
return {}
def unimplemented_test_cases(self):
return []
return _SKIP_ADVANCED + _SKIP_COMPRESSION
def unimplemented_test_cases_server(self):
return _SKIP_ADVANCED + _SKIP_COMPRESSION
def __str__(self):
return 'c++'
@ -99,7 +107,10 @@ class CSharpLanguage:
return {}
def unimplemented_test_cases(self):
return []
return _SKIP_COMPRESSION
def unimplemented_test_cases_server(self):
return _SKIP_COMPRESSION
def __str__(self):
return 'csharp'
@ -125,7 +136,10 @@ class JavaLanguage:
return {}
def unimplemented_test_cases(self):
return []
return _SKIP_ADVANCED + _SKIP_COMPRESSION
def unimplemented_test_cases_server(self):
return _SKIP_ADVANCED + _SKIP_COMPRESSION
def __str__(self):
return 'java'
@ -152,7 +166,10 @@ class GoLanguage:
return {}
def unimplemented_test_cases(self):
return []
return _SKIP_ADVANCED + _SKIP_COMPRESSION
def unimplemented_test_cases_server(self):
return _SKIP_ADVANCED + _SKIP_COMPRESSION
def __str__(self):
return 'go'
@ -180,6 +197,9 @@ class Http2Client:
def unimplemented_test_cases(self):
return _TEST_CASES
def unimplemented_test_cases_server(self):
return []
def __str__(self):
return 'http2'
@ -203,7 +223,10 @@ class NodeLanguage:
return {}
def unimplemented_test_cases(self):
return []
return _SKIP_COMPRESSION
def unimplemented_test_cases_server(self):
return _SKIP_COMPRESSION
def __str__(self):
return 'node'
@ -225,6 +248,9 @@ class PHPLanguage:
return {}
def unimplemented_test_cases(self):
return _SKIP_ADVANCED + _SKIP_COMPRESSION
def unimplemented_test_cases_server(self):
return []
def __str__(self):
@ -251,7 +277,10 @@ class RubyLanguage:
return {}
def unimplemented_test_cases(self):
return []
return _SKIP_ADVANCED + _SKIP_COMPRESSION
def unimplemented_test_cases_server(self):
return _SKIP_ADVANCED + _SKIP_COMPRESSION
def __str__(self):
return 'ruby'
@ -289,7 +318,11 @@ class PythonLanguage:
return {'LD_LIBRARY_PATH': '{}/libs/opt'.format(DOCKER_WORKDIR_ROOT)}
def unimplemented_test_cases(self):
return ['jwt_token_creds', 'per_rpc_creds']
return _SKIP_ADVANCED + _SKIP_COMPRESSION + ['jwt_token_creds',
'per_rpc_creds']
def unimplemented_test_cases_server(self):
return _SKIP_ADVANCED + _SKIP_COMPRESSION
def __str__(self):
return 'python'
@ -312,7 +345,9 @@ _SERVERS = ['c++', 'node', 'csharp', 'java', 'go', 'ruby', 'python']
_TEST_CASES = ['large_unary', 'empty_unary', 'ping_pong',
'empty_stream', 'client_streaming', 'server_streaming',
'cancel_after_begin', 'cancel_after_first_response',
'timeout_on_sleeping_server']
'timeout_on_sleeping_server', 'custom_metadata',
'status_code_and_message', 'unimplemented_method',
'large_compressed_unary', 'server_compressed_streaming']
_AUTH_TEST_CASES = ['compute_engine_creds', 'jwt_token_creds',
'oauth2_auth_token', 'per_rpc_creds']
@ -635,9 +670,10 @@ try:
for language in languages:
for test_case in _TEST_CASES:
if not test_case in language.unimplemented_test_cases():
test_job = cloud_to_prod_jobspec(language, test_case,
docker_image=docker_images.get(str(language)))
jobs.append(test_job)
if not test_case in _SKIP_ADVANCED + _SKIP_COMPRESSION:
test_job = cloud_to_prod_jobspec(language, test_case,
docker_image=docker_images.get(str(language)))
jobs.append(test_job)
# TODO(carl-mastrangelo): Currently prod TLS terminators aren't spec compliant. Reenable
# this once a better solution is in place.
@ -664,16 +700,21 @@ try:
for server_name, server_address in server_addresses.iteritems():
(server_host, server_port) = server_address
server_language = _LANGUAGES.get(server_name, None)
skip_server = [] # test cases unimplemented by server
if server_language:
skip_server = server_language.unimplemented_test_cases_server()
for language in languages:
for test_case in _TEST_CASES:
if not test_case in language.unimplemented_test_cases():
test_job = cloud_to_cloud_jobspec(language,
test_case,
server_name,
server_host,
server_port,
docker_image=docker_images.get(str(language)))
jobs.append(test_job)
if not test_case in skip_server:
test_job = cloud_to_cloud_jobspec(language,
test_case,
server_name,
server_host,
server_port,
docker_image=docker_images.get(str(language)))
jobs.append(test_job)
if args.http2_interop:
for test_case in _HTTP2_TEST_CASES:

Loading…
Cancel
Save