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

Adding auth test into suite to be run automatically
pull/777/head
Qi Zhao 10 years ago
commit 5ebc6e6cbd
  1. 13
      tools/gce_setup/cloud_prod_runner.sh
  2. 26
      tools/gce_setup/grpc_docker.sh

@ -32,6 +32,7 @@
main() { main() {
source grpc_docker.sh source grpc_docker.sh
test_cases=(large_unary empty_unary ping_pong client_streaming server_streaming service_account_creds compute_engine_creds) test_cases=(large_unary empty_unary ping_pong client_streaming server_streaming service_account_creds compute_engine_creds)
auth_test_cases=(service_account_creds compute_engine_creds)
clients=(cxx java go ruby node) clients=(cxx java go ruby node)
for test_case in "${test_cases[@]}" for test_case in "${test_cases[@]}"
do do
@ -45,6 +46,18 @@ main() {
fi fi
done done
done done
for test_case in "${auth_test_cases[@]}"
do
for client in "${clients[@]}"
do
if grpc_cloud_prod_auth_test $test_case grpc-docker-testclients $client
then
echo "$test_case $client $server passed" >> /tmp/cloud_prod_result.txt
else
echo "$test_case $client $server failed" >> /tmp/cloud_prod_result.txt
fi
done
done
gsutil cp /tmp/cloud_prod_result.txt gs://stoked-keyword-656-output/cloud_prod_result.txt gsutil cp /tmp/cloud_prod_result.txt gs://stoked-keyword-656-output/cloud_prod_result.txt
rm /tmp/cloud_prod_result.txt rm /tmp/cloud_prod_result.txt
} }

@ -350,7 +350,7 @@ grpc_interop_test_flags() {
echo "$FUNCNAME: missing arg: test_case" 1>&2 echo "$FUNCNAME: missing arg: test_case" 1>&2
return 1 return 1
} }
echo "--server_host=$server_ip --server_port=$port --test_case=$test_case" echo "--server_host_override=foo.test.google.fr --server_host=$server_ip --server_port=$port --test_case=$test_case"
} }
# checks the positional args and assigns them to variables visible in the caller # checks the positional args and assigns them to variables visible in the caller
@ -673,7 +673,7 @@ _grpc_launch_servers_args() {
[[ -n $1 ]] && { [[ -n $1 ]] && {
servers="$@" servers="$@"
} || { } || {
servers="cxx java go node ruby" servers="cxx java go node ruby python"
echo "$FUNCNAME: no servers specified, will launch defaults '$servers'" echo "$FUNCNAME: no servers specified, will launch defaults '$servers'"
} }
} }
@ -795,16 +795,7 @@ grpc_interop_test() {
echo " $ssh_cmd" echo " $ssh_cmd"
echo "on $host" echo "on $host"
[[ $dry_run == 1 ]] && return 0 # don't run the command on a dry run [[ $dry_run == 1 ]] && return 0 # don't run the command on a dry run
gcloud compute $project_opt ssh $zone_opt $host --command "$cmd" & gcloud compute $project_opt ssh $zone_opt $host --command "$cmd"
PID=$!
sleep 10
echo "pid is $PID"
if ps -p $PID
then
kill $PID
return 1
fi
} }
# Runs a test command on a docker instance. # Runs a test command on a docker instance.
@ -850,16 +841,7 @@ grpc_cloud_prod_test() {
echo " $ssh_cmd" echo " $ssh_cmd"
echo "on $host" echo "on $host"
[[ $dry_run == 1 ]] && return 0 # don't run the command on a dry run [[ $dry_run == 1 ]] && return 0 # don't run the command on a dry run
gcloud compute $project_opt ssh $zone_opt $host --command "$cmd" & gcloud compute $project_opt ssh $zone_opt $host --command "$cmd"
PID=$!
sleep 10
echo "pid is $PID"
if ps -p $PID
then
kill $PID
return 1
fi
} }
# Runs a test command on a docker instance. # Runs a test command on a docker instance.

Loading…
Cancel
Save