Actually test results
-set -x
-set -v
+#!/bin/bash
+# Copyright 2017 Google Inc.
+#
+# Licensed under the Apache License, Version 2.0 (the "License");
+# you may not use this file except in compliance with the License.
+# You may obtain a copy of the License at
+#
+# http://www.apache.org/licenses/LICENSE-2.0
+#
+# Unless required by applicable law or agreed to in writing, software
+# distributed under the License is distributed on an "AS IS" BASIS,
+# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+# See the License for the specific language governing permissions and
+# limitations under the License.
+
+# set -x
+# set -v
# Temporary directory to store any output to display on error
-export ERROR_OUTPUT_DIR
-ERROR_OUTPUT_DIR="$(mktemp -d)"
+export ERROR_OUTPUT_DIR="$(mktemp -d)"
# trap 'rm -r "${ERROR_OUTPUT_DIR}"' EXIT
URL="dot-lesv-qa-999.prom-qa.sandbox.google.com"
@@ -16,6 +30,9 @@ function TestIt() {
curl -s --show-error "https://${1}-${URL}/${2}" | \
tee -a "${ERROR_OUTPUT_DIR}/response.txt" | \
grep "${3}"
+ if [ "${?}" -ne 0 ]; then
+ echo "${1}/${2} ****** NOT FOUND"
+ fi
}
# gcloud config configurations activate qa
@@ -51,3 +68,5 @@ TestIt "kotlin-spark-appengine-standard" "hello" \
TestIt "sparkjava-appengine-standard" "" \
"Hello from SparkJava running on GAE Standard Java8 runtime"
+
+echo "STATUS: ${?}"
