Add Node pure JS interop client

pull/14661/head
murgatroid99 7 years ago
parent c50ded274c
commit 2c86e064f0
  1. 3
      tools/dockerfile/interoptest/grpc_interop_node/Dockerfile
  2. 31
      tools/run_tests/run_interop_tests.py

@ -75,7 +75,8 @@ RUN /bin/bash -l -c "nvm install 4 && npm config set cache /tmp/npm-cache && npm
RUN /bin/bash -l -c "nvm install 5 && npm config set cache /tmp/npm-cache && npm install -g npm"
RUN /bin/bash -l -c "nvm install 6 && npm config set cache /tmp/npm-cache && npm install -g npm"
RUN /bin/bash -l -c "nvm install 8 && npm config set cache /tmp/npm-cache && npm install -g npm"
RUN /bin/bash -l -c "nvm alias default 8"
RUN /bin/bash -l -c "nvm install 9 && npm config set cache /tmp/npm-cache && npm install -g npm"
RUN /bin/bash -l -c "nvm alias default 9"
# Prepare ccache
RUN ln -s /usr/bin/ccache /usr/local/bin/gcc
RUN ln -s /usr/bin/ccache /usr/local/bin/g++

@ -384,6 +384,34 @@ class NodeLanguage:
def __str__(self):
return 'node'
class NodePureJSLanguage:
def __init__(self):
self.client_cwd = '../grpc-node'
self.server_cwd = '../grpc-node'
self.safename = str(self)
def client_cmd(self, args):
return [
'packages/grpc-native-core/deps/grpc/tools/run_tests/interop/with_nvm.sh',
'node', '--require', './test/fixtures/native_js',
'test/interop/interop_client.js'
] + args
def cloud_to_prod_env(self):
return {}
def global_env(self):
return {}
def unimplemented_test_cases(self):
return _SKIP_COMPRESSION + _SKIP_DATA_FRAME_PADDING
def unimplemented_test_cases_server(self):
return []
def __str__(self):
return 'nodepurejs'
class PHPLanguage:
@ -559,6 +587,7 @@ _LANGUAGES = {
'java': JavaLanguage(),
'javaokhttp': JavaOkHttpClient(),
'node': NodeLanguage(),
'nodepurejs': NodePureJSLanguage(),
'php': PHPLanguage(),
'php7': PHP7Language(),
'objc': ObjcLanguage(),
@ -676,7 +705,7 @@ def auth_options(language, test_case):
if test_case in ['jwt_token_creds', 'per_rpc_creds', 'oauth2_auth_token']:
if language in [
'csharp', 'csharpcoreclr', 'node', 'php', 'php7', 'python',
'ruby'
'ruby', 'nodepurejs'
]:
env['GOOGLE_APPLICATION_CREDENTIALS'] = key_filepath
else:

Loading…
Cancel
Save