From a6d738414da675dda53c8dee82299b724f0d5fe4 Mon Sep 17 00:00:00 2001 From: Donna Dionne Date: Mon, 23 Feb 2015 15:03:28 -0800 Subject: [PATCH] Adding go auth tests Adding python to images to be pulled after building --- tools/dockerfile/grpc_go/Dockerfile | 3 +++ tools/gce_setup/grpc_docker.sh | 30 +++++++++++++++++++++++++ tools/gce_setup/shared_startup_funcs.sh | 3 ++- 3 files changed, 35 insertions(+), 1 deletion(-) diff --git a/tools/dockerfile/grpc_go/Dockerfile b/tools/dockerfile/grpc_go/Dockerfile index 94d962b4482..e1671eaee14 100644 --- a/tools/dockerfile/grpc_go/Dockerfile +++ b/tools/dockerfile/grpc_go/Dockerfile @@ -48,6 +48,9 @@ RUN git config --global url."git@github.com:".insteadOf "https://github.com/" # Get the source from GitHub RUN go get google.golang.org/grpc +# Add a service_account directory containing the auth creds file +ADD service_account service_account + # Build the interop client and server RUN cd src/google.golang.org/grpc/interop/client && go install RUN cd src/google.golang.org/grpc/interop/server && go install diff --git a/tools/gce_setup/grpc_docker.sh b/tools/gce_setup/grpc_docker.sh index 41a1d200e60..bbc138c6beb 100755 --- a/tools/gce_setup/grpc_docker.sh +++ b/tools/gce_setup/grpc_docker.sh @@ -935,6 +935,36 @@ grpc_cloud_prod_gen_ruby_cmd() { echo $the_cmd } +# constructs the full dockerized Go interop test cmd. +# +# call-seq: +# flags= .... # generic flags to include the command +# cmd=$($grpc_gen_test_cmd $flags) +grpc_cloud_prod_auth_service_account_creds_gen_go_cmd() { + local cmd_prefix="sudo docker run grpc/go /bin/bash -c" + local test_script="cd src/google.golang.org/grpc/interop/client" + local test_script+=" && go run client.go --use_tls=true" + local gfe_flags=" --tls_ca_file=\"\" --tls_server_name=\"\" --server_port=443 --server_host=grpc-test.sandbox.google.com" + local added_gfe_flags=$(_grpc_svc_acc_test_flags) + local the_cmd="$cmd_prefix '$test_script $gfe_flags $added_gfe_flags $@'" + echo $the_cmd +} + +# constructs the full dockerized Go interop test cmd. +# +# call-seq: +# flags= .... # generic flags to include the command +# cmd=$($grpc_gen_test_cmd $flags) +grpc_cloud_prod_auth_compute_engine_creds_gen_go_cmd() { + local cmd_prefix="sudo docker run grpc/go /bin/bash -c" + local test_script="cd src/google.golang.org/grpc/interop/client" + local test_script+=" && go run client.go --use_tls=true" + local gfe_flags=" --tls_ca_file=\"\" --tls_server_name=\"\" --server_port=443 --server_host=grpc-test.sandbox.google.com" + local added_gfe_flags=$(_grpc_gce_test_flags) + local the_cmd="$cmd_prefix '$test_script $gfe_flags $added_gfe_flags $@'" + echo $the_cmd +} + # constructs the full dockerized ruby service_account auth interop test cmd. # # call-seq: diff --git a/tools/gce_setup/shared_startup_funcs.sh b/tools/gce_setup/shared_startup_funcs.sh index 242c7921013..195f8f28a88 100755 --- a/tools/gce_setup/shared_startup_funcs.sh +++ b/tools/gce_setup/shared_startup_funcs.sh @@ -364,7 +364,7 @@ grpc_docker_launch_registry() { grpc_docker_pull_known() { local addr=$1 [[ -n $addr ]] || addr="0.0.0.0:5000" - local known="base cxx php_base php ruby_base ruby java_base java go node_base node" + local known="base cxx php_base php ruby_base ruby java_base java go node_base node python_base python" echo "... pulling docker images for '$known'" for i in $known do @@ -408,6 +408,7 @@ grpc_dockerfile_install() { } [[ $image_label == "grpc/go" ]] && { grpc_docker_sync_github_key $dockerfile_dir/.ssh 'go_ssh_key' || return 1; + grpc_docker_sync_service_account $dockerfile_dir/service_account || return 1; } [[ $image_label == "grpc/java_base" ]] && { grpc_docker_sync_github_key $dockerfile_dir/.ssh 'java_base_ssh_key' || return 1;