Merge pull request #733 from donnadionne/go-auth-tests

Go auth tests
pull/736/head
Qi Zhao 10 years ago
commit cb1f8c01d0
  1. 3
      tools/dockerfile/grpc_go/Dockerfile
  2. 30
      tools/gce_setup/grpc_docker.sh
  3. 3
      tools/gce_setup/shared_startup_funcs.sh

@ -48,6 +48,9 @@ RUN git config --global url."git@github.com:".insteadOf "https://github.com/"
# Get the source from GitHub # Get the source from GitHub
RUN go get google.golang.org/grpc 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 # 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/client && go install
RUN cd src/google.golang.org/grpc/interop/server && go install RUN cd src/google.golang.org/grpc/interop/server && go install

@ -935,6 +935,36 @@ grpc_cloud_prod_gen_ruby_cmd() {
echo $the_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. # constructs the full dockerized ruby service_account auth interop test cmd.
# #
# call-seq: # call-seq:

@ -364,7 +364,7 @@ grpc_docker_launch_registry() {
grpc_docker_pull_known() { grpc_docker_pull_known() {
local addr=$1 local addr=$1
[[ -n $addr ]] || addr="0.0.0.0:5000" [[ -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'" echo "... pulling docker images for '$known'"
for i in $known for i in $known
do do
@ -408,6 +408,7 @@ grpc_dockerfile_install() {
} }
[[ $image_label == "grpc/go" ]] && { [[ $image_label == "grpc/go" ]] && {
grpc_docker_sync_github_key $dockerfile_dir/.ssh 'go_ssh_key' || return 1; 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" ]] && { [[ $image_label == "grpc/java_base" ]] && {
grpc_docker_sync_github_key $dockerfile_dir/.ssh 'java_base_ssh_key' || return 1; grpc_docker_sync_github_key $dockerfile_dir/.ssh 'java_base_ssh_key' || return 1;

Loading…
Cancel
Save