There are so many fixes
This commit is contained in:
parent
0ff93b83ec
commit
37c59c9136
3 changed files with 3 additions and 3 deletions
|
@ -28,7 +28,7 @@ func TestAPIGetRawFileOrLFS(t *testing.T) {
|
||||||
|
|
||||||
// Test with LFS
|
// Test with LFS
|
||||||
onGiteaRun(t, func(t *testing.T, u *url.URL) {
|
onGiteaRun(t, func(t *testing.T, u *url.URL) {
|
||||||
httpContext := NewAPITestContext(t, "user2", "repo-lfs-test", "repo")
|
httpContext := NewAPITestContext(t, "user2", "repo-lfs-test", "repo", "delete_repo")
|
||||||
doAPICreateRepository(httpContext, false, func(t *testing.T, repository api.Repository) {
|
doAPICreateRepository(httpContext, false, func(t *testing.T, repository api.Repository) {
|
||||||
u.Path = httpContext.GitPath()
|
u.Path = httpContext.GitPath()
|
||||||
dstPath := t.TempDir()
|
dstPath := t.TempDir()
|
||||||
|
|
|
@ -446,7 +446,7 @@ func TestAPIOrgRepoCreate(t *testing.T) {
|
||||||
for _, testCase := range testCases {
|
for _, testCase := range testCases {
|
||||||
user := unittest.AssertExistsAndLoadBean(t, &user_model.User{ID: testCase.ctxUserID})
|
user := unittest.AssertExistsAndLoadBean(t, &user_model.User{ID: testCase.ctxUserID})
|
||||||
session := loginUser(t, user.Name)
|
session := loginUser(t, user.Name)
|
||||||
token := getTokenForLoggedInUser(t, session, "repo")
|
token := getTokenForLoggedInUser(t, session, "admin_org")
|
||||||
req := NewRequestWithJSON(t, "POST", fmt.Sprintf("/api/v1/org/%s/repos?token="+token, testCase.orgName), &api.CreateRepoOption{
|
req := NewRequestWithJSON(t, "POST", fmt.Sprintf("/api/v1/org/%s/repos?token="+token, testCase.orgName), &api.CreateRepoOption{
|
||||||
Name: testCase.repoName,
|
Name: testCase.repoName,
|
||||||
})
|
})
|
||||||
|
|
|
@ -166,7 +166,7 @@ func testKeyOnlyOneType(t *testing.T, u *url.URL) {
|
||||||
otherSSHURL := createSSHUrl(otherCtx.GitPath(), u)
|
otherSSHURL := createSSHUrl(otherCtx.GitPath(), u)
|
||||||
dstOtherPath := t.TempDir()
|
dstOtherPath := t.TempDir()
|
||||||
|
|
||||||
t.Run("DeleteRepository", doAPIDeleteRepository(ctx))
|
t.Run("DeleteRepository", doAPIDeleteRepository(ctxWithDeleteRepo))
|
||||||
|
|
||||||
t.Run("FailToCreateUserKeyAsStillDeploy", doAPICreateUserKey(failCtx, keyname, keyFile))
|
t.Run("FailToCreateUserKeyAsStillDeploy", doAPICreateUserKey(failCtx, keyname, keyFile))
|
||||||
|
|
||||||
|
|
Loading…
Add table
Reference in a new issue