You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@trafficcontrol.apache.org by mi...@apache.org on 2017/01/13 18:02:26 UTC

[5/7] incubator-trafficcontrol git commit: fail on curl fail

fail on curl fail


Project: http://git-wip-us.apache.org/repos/asf/incubator-trafficcontrol/repo
Commit: http://git-wip-us.apache.org/repos/asf/incubator-trafficcontrol/commit/aff7d8fe
Tree: http://git-wip-us.apache.org/repos/asf/incubator-trafficcontrol/tree/aff7d8fe
Diff: http://git-wip-us.apache.org/repos/asf/incubator-trafficcontrol/diff/aff7d8fe

Branch: refs/heads/master
Commit: aff7d8fe497ba6fac81149d416c8d86f79531138
Parents: 3b07e0f
Author: Dan Kirkwood <da...@gmail.com>
Authored: Wed Jan 11 17:20:37 2017 -0700
Committer: Dan Kirkwood <da...@gmail.com>
Committed: Fri Jan 13 10:30:32 2017 -0700

----------------------------------------------------------------------
 traffic_ops/app/db/pg-migration/get-to-data.sh | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/incubator-trafficcontrol/blob/aff7d8fe/traffic_ops/app/db/pg-migration/get-to-data.sh
----------------------------------------------------------------------
diff --git a/traffic_ops/app/db/pg-migration/get-to-data.sh b/traffic_ops/app/db/pg-migration/get-to-data.sh
index fd9f739..5eb801c 100755
--- a/traffic_ops/app/db/pg-migration/get-to-data.sh
+++ b/traffic_ops/app/db/pg-migration/get-to-data.sh
@@ -24,8 +24,8 @@ cat >$cred <<-CREDS
 	{ "u" : "$TO_USER", "p" : "$TO_PASSWORD" }
 CREDS
 
-curl -k -H "Accept: application/json" --cookie "$cookiejar" --cookie-jar "$cookiejar" -X POST --data @"$cred" "$TO_SERVER/api/1.2/user/login"
-curl $output -k -s --cookie "$cookiejar" -X GET "$TO_SERVER/dbdump"
+curl -f -k -H "Accept: application/json" --cookie "$cookiejar" --cookie-jar "$cookiejar" -X POST --data @"$cred" "$TO_SERVER/api/1.2/user/login"  || exit 1
+curl $output -f -k -s --cookie "$cookiejar" -X GET "$TO_SERVER/dbdump"  || exit 1
 
 waiting=/sync/waiting-for-dataimport
 while [[ ! -f $waiting ]]; do