forked from NYANDEV/forgejo
Display URLs in integration test logs (#1924)
This commit is contained in:
parent
6d613fb28e
commit
61716bd8f7
15 changed files with 47 additions and 71 deletions
|
@ -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)
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue