diff options
author | Qi Zhao <toqizhao@gmail.com> | 2015-02-23 15:17:41 -0800 |
---|---|---|
committer | Qi Zhao <toqizhao@gmail.com> | 2015-02-23 15:17:41 -0800 |
commit | cb1f8c01d046814ac7f6f89e18baf8a763444743 (patch) | |
tree | 088175059f6c39a44b7b31c8508eea68cf25cc06 | |
parent | 74ae8f61d9cbc51d532b6ad98185094c1912a624 (diff) | |
parent | a6d738414da675dda53c8dee82299b724f0d5fe4 (diff) |
Merge pull request #733 from donnadionne/go-auth-tests
Go auth tests
-rw-r--r-- | tools/dockerfile/grpc_go/Dockerfile | 3 | ||||
-rwxr-xr-x | tools/gce_setup/grpc_docker.sh | 30 | ||||
-rwxr-xr-x | tools/gce_setup/shared_startup_funcs.sh | 3 |
3 files changed, 35 insertions, 1 deletions
diff --git a/tools/dockerfile/grpc_go/Dockerfile b/tools/dockerfile/grpc_go/Dockerfile index 94d962b448..e1671eaee1 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 41a1d200e6..bbc138c6be 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 242c792101..195f8f28a8 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; |