Display URLs in integration test logs (#1924)

This commit is contained in:
Ethan Koenig 2017-06-09 20:41:36 -04:00 committed by Bo-Yi Wu
parent 6d613fb28e
commit 61716bd8f7
15 changed files with 47 additions and 71 deletions

View file

@ -19,11 +19,10 @@ import (
func assertProtectedBranch(t *testing.T, repoID int64, branchName string, isErr, canPush bool) {
reqURL := fmt.Sprintf("/api/internal/branch/%d/%s", repoID, url.QueryEscape(branchName))
req, err := http.NewRequest("GET", reqURL, nil)
req := NewRequest(t, "GET", reqURL)
t.Log(reqURL)
req.Header.Add("Authorization", fmt.Sprintf("Bearer %s", setting.InternalToken))
assert.NoError(t, err)
resp := MakeRequest(req)
if isErr {
assert.EqualValues(t, 500, resp.HeaderCode)