File tree Expand file tree Collapse file tree 17 files changed +35
-20
lines changed
Expand file tree Collapse file tree 17 files changed +35
-20
lines changed Original file line number Diff line number Diff line change @@ -29,7 +29,8 @@ ibmcloud ce app create -n anj-app --image ${REGISTRY}/app-n-job
2929URL=$( ibmcloud ce app get -n anj-app -o url)
3030
3131# And call it
32- curl -Ls $URL | tee out
32+ curl -fs $URL | tee out
33+ [[ " ${PIPESTATUS[0]} " == " 0" ]]
3334
3435if ! grep " Hello from.*app" out > /dev/null ; then
3536 echo " Unexpected output"
Original file line number Diff line number Diff line change @@ -32,7 +32,8 @@ URL=$(ibmcloud ce app get -n a2j-app -o url)
3232ibmcloud ce job create -n a2j-job --ai=1-${COUNT} --image ${REGISTRY} /a2j-job
3333
3434# Now, curl the app and see if it creates the job
35- curl -s ${URL} /a2j-job -X PUT | tee out
35+ curl -fs ${URL} /a2j-job -X PUT | tee out
36+ [[ " ${PIPESTATUS[0]} " == " 0" ]]
3637jobrun=$( cat out)
3738
3839while ! ibmcloud ce jobrun get -n ${jobrun} | grep " Succeeded.*${COUNT} " ; do
Original file line number Diff line number Diff line change @@ -14,6 +14,11 @@ for file in `find . -name run | sort` ; do (
1414
1515 # Run the sample with whatever REGISTRY we're pointing to
1616 ./run " $@ "
17+ rc=$?
18+ if [[ " $rc " != " 0" ]]; then
19+ echo exit: $rc
20+ exit $rc
21+ fi
1722
1823) done
1924
Original file line number Diff line number Diff line change @@ -36,7 +36,8 @@ URL=$(ibmcloud ce app get -n ba-app -o url)
3636ibmcloud ce app bind --name ba-app --service-instance ba-db
3737
3838# Curl the app to make sure it had the creds
39- curl -Ls ${URL} | tee out
39+ curl -fs ${URL} | tee out
40+ [[ " ${PIPESTATUS[0]} " == " 0" ]]
4041
4142if ! grep VCAP_SERVICES out > /dev/null ; then
4243 echo " Missing VCAP_SERVICES in App's env vars"
Original file line number Diff line number Diff line change @@ -48,7 +48,8 @@ ibmcloud ce app create -n lister --image $REGISTRY/cecli \
4848APP=$( ibmcloud ce app get -n lister -o url)
4949
5050# Call the app - if it works it should return the output of the 'app list' cmd
51- curl -s $APP /list | tee out
51+ curl -fs $APP /list | tee out
52+ [[ " ${PIPESTATUS[0]} " == " 0" ]]
5253
5354# Verify we see our App in the output
5455grep " ^lister " out
Original file line number Diff line number Diff line change @@ -39,10 +39,11 @@ ibmcloud ce app create -n cm-app-env --image ${REGISTRY}/ce-config-env \
3939URL=$( ibmcloud ce app get -n cm-app-env -o url)
4040
4141# Just force it to log something by hitting it
42- curl -Ls $URL
42+ curl -fs $URL
4343
4444# Now check the logs to see if the env vars were set
4545ibmcloud ce app logs -n cm-app-env | tee out
46+ [[ " ${PIPESTATUS[0]} " == " 0" ]]
4647grep MY_ out
4748if ! [[ $( grep MY_ out | wc -l) == " 4" ]]; then
4849 echo " Unexpected output"
Original file line number Diff line number Diff line change @@ -39,10 +39,11 @@ ibmcloud ce app create -n cm-app-vol --image ${REGISTRY}/ce-config-vol \
3939URL=$( ibmcloud ce app get -n cm-app-vol -o url)
4040
4141# Just force it to log something by hitting it
42- curl -Ls $URL
42+ curl -fs $URL
4343
4444# Now check the logs to see if the env vars were set
4545ibmcloud ce app logs -n cm-app-vol | tee out
46+ [[ " ${PIPESTATUS[0]} " == " 0" ]]
4647grep MY_ out
4748if ! [[ $( grep MY_ out | wc -l) == " 4" ]]; then
4849 echo " Unexpected output"
Original file line number Diff line number Diff line change @@ -88,7 +88,7 @@ cat out
8888echo " =============="
8989echo " Event stats:"
9090
91- curl -Ls ${URL} /stats
91+ curl -fs ${URL} /stats
9292
9393# Clean up
9494clean
Original file line number Diff line number Diff line change @@ -25,9 +25,10 @@ ibmcloud ce app create -n hello --image ${REGISTRY}/hello
2525URL=$( ibmcloud ce app get -n hello -o url)
2626
2727# Now call it
28- curl -Ls $URL
28+ curl -fs $URL | tee out
29+ [[ " ${PIPESTATUS[0]} " == " 0" ]]
2930
30- if ! [[ " $( curl -Ls $URL ) " == " Hello World" ]]; then
31+ if ! [[ " $( cat out ) " == " Hello World" ]]; then
3132 echo " Unexpected output"
3233 exit 1
3334fi
Original file line number Diff line number Diff line change @@ -27,9 +27,10 @@ ibmcloud ce app create -n helloworld --image ${REGISTRY}/helloworld
2727URL=$( ibmcloud ce app get -n helloworld -o url)
2828
2929# Now call it
30- curl -Ls $URL
30+ curl -fs $URL | tee out
31+ [[ " ${PIPESTATUS[0]} " == " 0" ]]
3132
32- if ! [[ " $( curl -Ls ${URL} --post301 -d " Hi" ) " == " Hi" ]]; then
33+ if ! [[ " $( curl -fs ${URL} -d " Hi" ) " == " Hi" ]]; then
3334 echo " Unexpected output"
3435 exit 1
3536fi
You can’t perform that action at this time.
0 commit comments