Fix push_basic.sh
This CL changes the check for base URL to a query to the json endpoint.
This makes the test pass on the trybot.
BUG=353718
Review URL: https://codereview.chromium.org/1160273005
git-svn-id: svn://svn.chromium.org/chrome/trunk/tools/depot_tools@295538 0039d316-1c4b-4281-b951-d872f2087c98
diff --git a/tests/push-basic.sh b/tests/push-basic.sh
index e98d58f..980d780 100755
--- a/tests/push-basic.sh
+++ b/tests/push-basic.sh
@@ -44,8 +44,9 @@
--data-urlencode xsrf_token="$(print_xsrf_token)" \
$URL/edit
+ API=$(echo $URL | sed -e 's/\([0-9]\+\)$/api\/\1/')
test_expect_success "Base URL contains branch name" \
- "curl -s $($GIT_CL_STATUS --field=url) | grep 'URL:[[:space:]]*[^<]' | grep -q '@master'"
+ "curl -s $API | python -mjson.tool | grep base_url | grep -q '@master'"
test_expect_success "git-cl land ok" \
"$GIT_CL land -f --no-oauth2"