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