Enable service_account_creds test and compute_engine_creds for gRpc-java.

pull/1827/head
Xudong Ma 10 years ago
parent 7181d85f8b
commit 8cbc2506d5
  1. 3
      tools/dockerfile/grpc_java/Dockerfile
  2. 34
      tools/gce_setup/grpc_docker.sh
  3. 3
      tools/gce_setup/shared_startup_funcs.sh

@ -36,5 +36,8 @@ RUN cd /var/local/git/grpc-java/lib/netty && \
RUN cd /var/local/git/grpc-java && \
./gradlew build installDist
# Add a service_account directory containing the auth creds file
ADD service_account service_account
# Specify the default command such that the interop server runs on its known testing port
CMD ["/var/local/git/grpc-java/run-test-server.sh", "--use_tls=true", "--port=8030"]

@ -1274,8 +1274,7 @@ grpc_cloud_prod_gen_go_cmd() {
# cmd=$($grpc_gen_test_cmd $flags)
grpc_interop_gen_java_cmd() {
local cmd_prefix="sudo docker run grpc/java";
local test_script="/var/local/git/grpc-java/run-test-client.sh";
local test_script+=" --use_test_ca=true --use_tls=true"
local test_script="/var/local/git/grpc-java/run-test-client.sh --use_test_ca=true --use_tls=true";
local the_cmd="$cmd_prefix $test_script $@";
echo $the_cmd
}
@ -1287,13 +1286,40 @@ grpc_interop_gen_java_cmd() {
# cmd=$($grpc_gen_test_cmd $flags)
grpc_cloud_prod_gen_java_cmd() {
local cmd_prefix="sudo docker run grpc/java";
local test_script="/var/local/git/grpc-java/run-test-client.sh";
local test_script+=" --use_tls=true"
local test_script="/var/local/git/grpc-java/run-test-client.sh --use_tls=true";
local gfe_flags=$(_grpc_prod_gfe_flags)
local the_cmd="$cmd_prefix $test_script $gfe_flags $@";
echo $the_cmd
}
# constructs the full dockerized java service_account auth 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_java_cmd() {
local cmd_prefix="sudo docker run grpc/java";
local test_script="/var/local/git/grpc-java/run-test-client.sh --use_tls=true";
local gfe_flags=$(_grpc_prod_gfe_flags)
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 java gce auth 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_java_cmd() {
local cmd_prefix="sudo docker run grpc/java";
local test_script="/var/local/git/grpc-java/run-test-client.sh --use_tls=true";
local gfe_flags=$(_grpc_prod_gfe_flags)
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 php interop test cmd.
#
# TODO(mlumish): update this to use the script once that's on git

@ -413,6 +413,9 @@ grpc_dockerfile_install() {
[[ $image_label == "grpc/java_base" ]] && {
grpc_docker_sync_github_key $dockerfile_dir/.ssh 'java_base_ssh_key' || return 1;
}
[[ $image_label == "grpc/java" ]] && {
grpc_docker_sync_service_account $dockerfile_dir/service_account || return 1;
}
[[ $image_label == "grpc/ruby" ]] && {
grpc_docker_sync_roots_pem $dockerfile_dir/cacerts || return 1;
grpc_docker_sync_service_account $dockerfile_dir/service_account || return 1;

Loading…
Cancel
Save