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
29
29
URL=$( ibmcloud ce app get -n anj-app -o url)
30
30
31
31
# And call it
32
- curl -Ls $URL | tee out
32
+ curl -fs $URL | tee out
33
+ [[ " ${PIPESTATUS[0]} " == " 0" ]]
33
34
34
35
if ! grep " Hello from.*app" out > /dev/null ; then
35
36
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)
32
32
ibmcloud ce job create -n a2j-job --ai=1-${COUNT} --image ${REGISTRY} /a2j-job
33
33
34
34
# 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" ]]
36
37
jobrun=$( cat out)
37
38
38
39
while ! 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 (
14
14
15
15
# Run the sample with whatever REGISTRY we're pointing to
16
16
./run " $@ "
17
+ rc=$?
18
+ if [[ " $rc " != " 0" ]]; then
19
+ echo exit: $rc
20
+ exit $rc
21
+ fi
17
22
18
23
) done
19
24
Original file line number Diff line number Diff line change @@ -36,7 +36,8 @@ URL=$(ibmcloud ce app get -n ba-app -o url)
36
36
ibmcloud ce app bind --name ba-app --service-instance ba-db
37
37
38
38
# 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" ]]
40
41
41
42
if ! grep VCAP_SERVICES out > /dev/null ; then
42
43
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 \
48
48
APP=$( ibmcloud ce app get -n lister -o url)
49
49
50
50
# 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" ]]
52
53
53
54
# Verify we see our App in the output
54
55
grep " ^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 \
39
39
URL=$( ibmcloud ce app get -n cm-app-env -o url)
40
40
41
41
# Just force it to log something by hitting it
42
- curl -Ls $URL
42
+ curl -fs $URL
43
43
44
44
# Now check the logs to see if the env vars were set
45
45
ibmcloud ce app logs -n cm-app-env | tee out
46
+ [[ " ${PIPESTATUS[0]} " == " 0" ]]
46
47
grep MY_ out
47
48
if ! [[ $( grep MY_ out | wc -l) == " 4" ]]; then
48
49
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 \
39
39
URL=$( ibmcloud ce app get -n cm-app-vol -o url)
40
40
41
41
# Just force it to log something by hitting it
42
- curl -Ls $URL
42
+ curl -fs $URL
43
43
44
44
# Now check the logs to see if the env vars were set
45
45
ibmcloud ce app logs -n cm-app-vol | tee out
46
+ [[ " ${PIPESTATUS[0]} " == " 0" ]]
46
47
grep MY_ out
47
48
if ! [[ $( grep MY_ out | wc -l) == " 4" ]]; then
48
49
echo " Unexpected output"
Original file line number Diff line number Diff line change @@ -88,7 +88,7 @@ cat out
88
88
echo " =============="
89
89
echo " Event stats:"
90
90
91
- curl -Ls ${URL} /stats
91
+ curl -fs ${URL} /stats
92
92
93
93
# Clean up
94
94
clean
Original file line number Diff line number Diff line change @@ -25,9 +25,10 @@ ibmcloud ce app create -n hello --image ${REGISTRY}/hello
25
25
URL=$( ibmcloud ce app get -n hello -o url)
26
26
27
27
# Now call it
28
- curl -Ls $URL
28
+ curl -fs $URL | tee out
29
+ [[ " ${PIPESTATUS[0]} " == " 0" ]]
29
30
30
- if ! [[ " $( curl -Ls $URL ) " == " Hello World" ]]; then
31
+ if ! [[ " $( cat out ) " == " Hello World" ]]; then
31
32
echo " Unexpected output"
32
33
exit 1
33
34
fi
Original file line number Diff line number Diff line change @@ -27,9 +27,10 @@ ibmcloud ce app create -n helloworld --image ${REGISTRY}/helloworld
27
27
URL=$( ibmcloud ce app get -n helloworld -o url)
28
28
29
29
# Now call it
30
- curl -Ls $URL
30
+ curl -fs $URL | tee out
31
+ [[ " ${PIPESTATUS[0]} " == " 0" ]]
31
32
32
- if ! [[ " $( curl -Ls ${URL} --post301 -d " Hi" ) " == " Hi" ]]; then
33
+ if ! [[ " $( curl -fs ${URL} -d " Hi" ) " == " Hi" ]]; then
33
34
echo " Unexpected output"
34
35
exit 1
35
36
fi
You can’t perform that action at this time.
0 commit comments