From 9a73734650f854037050c379579dfea5f6bf2a1d Mon Sep 17 00:00:00 2001 From: Michael Lumish Date: Thu, 20 Aug 2020 13:36:16 -0700 Subject: [PATCH] Actually add the xds interop script --- packages/grpc-js/scripts/xds.sh | 44 +++++++++++++++++++++++++++++++++ 1 file changed, 44 insertions(+) create mode 100644 packages/grpc-js/scripts/xds.sh diff --git a/packages/grpc-js/scripts/xds.sh b/packages/grpc-js/scripts/xds.sh new file mode 100644 index 00000000..1b6fde5d --- /dev/null +++ b/packages/grpc-js/scripts/xds.sh @@ -0,0 +1,44 @@ +#!/bin/bash + +nvm use 12 + +set -exu -o pipefail +[[ -f /VERSION ]] && cat /VERSION + +cd $(dirname $0) +cd .. +base=$(pwd) +npm run compile + +cd ../../.. +branch=$(git branch --all --no-color --contains "${KOKORO_GITHUB_COMMIT}" \ + | grep -v HEAD | head -1) +shopt -s extglob +branch="${branch//[[:space:]]}" +branch="${branch##remotes/origin/}" +shopt -u extglob + +git clone -b "${branch}" --single-branch --depth=1 https://github.com/grpc/grpc.git + +grpc/tools/run_tests/helper_scripts/prep_xds.sh + +# Test cases "path_matching" and "header_matching" are not included in "all", +# because not all interop clients in all languages support these new tests. +# +# TODO: remove "path_matching" and "header_matching" from --test_case after +# they are added into "all". +GRPC_TRACE=xds_client,round_robin,resolving_load_balancer GRPC_VERBOSITY=DEBUG \ + python3 grpc/tools/run_tests/run_xds_tests.py \ + --test_case="all" \ + --project_id=grpc-testing \ + --source_image=projects/grpc-testing/global/images/xds-test-server-2 \ + --path_to_server_binary=/java_server/grpc-java/interop-testing/build/install/grpc-interop-testing/bin/xds-test-server \ + --gcp_suffix=$(date '+%s') \ + --verbose \ + --client_cmd="node grpc-node/packages/grpc-js/build/interop/xds-interop-client \ + --server=xds:///{server_uri} \ + --stats_port={stats_port} \ + --qps={qps} \ + {fail_on_failed_rpc} \ + {rpcs_to_send} \ + {metadata_to_send}" \ No newline at end of file