Fix several integration tests

This commit is contained in:
harryzcy 2022-10-30 17:22:09 -04:00
parent 62c9f70396
commit 15ed960dc5
No known key found for this signature in database
GPG key ID: CC2953E050C19686
2 changed files with 2 additions and 1 deletions

View file

@ -51,6 +51,7 @@ func TestAPIListRepoComments(t *testing.T) {
before := "2000-01-01T00:00:11+00:00" // unix: 946684811
since := "2000-01-01T00:00:12+00:00" // unix: 946684812
query.Add("before", before)
query.Add("token", token)
link.RawQuery = query.Encode()
req = NewRequest(t, "GET", link.String())
resp = session.MakeRequest(t, req, http.StatusOK)

View file

@ -51,7 +51,7 @@ func TestDumpRestore(t *testing.T) {
repo := unittest.AssertExistsAndLoadBean(t, &repo_model.Repository{Name: reponame})
repoOwner := unittest.AssertExistsAndLoadBean(t, &user_model.User{ID: repo.OwnerID})
session := loginUser(t, repoOwner.Name)
token := getTokenForLoggedInUser(t, session)
token := getTokenForLoggedInUser(t, session, "repo")
//
// Phase 1: dump repo1 from the Gitea instance to the filesystem