@@ -117,47 +117,3 @@ func TestActionsJobTokenAccessLFS(t *testing.T) {
117117 }))
118118 })
119119}
120-
121- // func TestActionsJobTokenAccessLFS(t *testing.T) {
122- // onGiteaRun(t, func(t *testing.T, u *url.URL) {
123- // task := unittest.AssertExistsAndLoadBean(t, &actions_model.ActionTask{ID: 47})
124- // require.NoError(t, task.GenerateToken())
125- // task.Status = actions_model.StatusRunning
126- // task.IsForkPullRequest = false
127- // err := actions_model.UpdateTask(t.Context(), task, "token_hash", "token_salt", "token_last_eight", "status", "is_fork_pull_request")
128- // require.NoError(t, err)
129- // session := emptyTestSession(t)
130- // httpContext := APITestContext{
131- // Session: session,
132- // Token: task.Token,
133- // Username: "user5",
134- // Reponame: "repo4",
135- // }
136-
137- // u.Path = httpContext.GitPath()
138- // dstPath := t.TempDir()
139-
140- // u.Path = httpContext.GitPath()
141- // u.User = url.UserPassword("gitea-actions", task.Token)
142-
143- // t.Run("Clone", doGitClone(dstPath, u))
144-
145- // t.Run("lfs-branch", doGitCheckoutBranch(dstPath, "--orphan", "lfs-branch"))
146-
147- // doGitPull(dstPath, "-f")
148-
149- // t.Run("delete master branch", doBranchDelete(httpContext, httpContext.Username, httpContext.Reponame, "master"))
150-
151- // t.Run("new-branch", doGitPushTestRepository(dstPath))
152-
153- // dstPath2 := t.TempDir()
154-
155- // t.Run("Partial Clone", doPartialGitClone(dstPath2, u))
156-
157- // lfs := lfsCommitAndPushTest(t, dstPath, testFileSizeSmall)[0]
158-
159- // reqLFS := NewRequest(t, "GET", "/api/v1/repos/user5/repo4/media/"+lfs)
160- // respLFS := MakeRequestNilResponseRecorder(t, reqLFS, http.StatusOK)
161- // assert.Equal(t, testFileSizeSmall, respLFS.Length)
162- // })
163- // }
0 commit comments