summaryrefslogtreecommitdiffstats
path: root/integrations/lfs_getobject_test.go
diff options
context:
space:
mode:
authorwxiaoguang <wxiaoguang@gmail.com>2022-08-09 11:22:24 +0800
committerGitHub <noreply@github.com>2022-08-09 11:22:24 +0800
commit75d96f4a0274c5b7566305d494c176e1a88b1589 (patch)
treed4dc134d9fea8f0f89f895e7bf30ec39146edf32 /integrations/lfs_getobject_test.go
parent820031e556af9548aa07e4de2669ca52bd7f63cb (diff)
downloadgitea-75d96f4a0274c5b7566305d494c176e1a88b1589.tar.gz
gitea-75d96f4a0274c5b7566305d494c176e1a88b1589.zip
Refactor legacy git init (#20376)
* merge `CheckLFSVersion` into `InitFull` (renamed from `InitWithSyncOnce`) * remove the `Once` during git init, no data-race now * for doctor sub-commands, `InitFull` should only be called in initialization stage Co-authored-by: zeripath <art27@cantab.net> Co-authored-by: Lunny Xiao <xiaolunwen@gmail.com>
Diffstat (limited to 'integrations/lfs_getobject_test.go')
-rw-r--r--integrations/lfs_getobject_test.go31
1 files changed, 0 insertions, 31 deletions
diff --git a/integrations/lfs_getobject_test.go b/integrations/lfs_getobject_test.go
index 4b6bb140d3..14a8ac253e 100644
--- a/integrations/lfs_getobject_test.go
+++ b/integrations/lfs_getobject_test.go
@@ -14,7 +14,6 @@ import (
git_model "code.gitea.io/gitea/models/git"
repo_model "code.gitea.io/gitea/models/repo"
- "code.gitea.io/gitea/modules/git"
"code.gitea.io/gitea/modules/json"
"code.gitea.io/gitea/modules/lfs"
"code.gitea.io/gitea/modules/setting"
@@ -83,11 +82,6 @@ func checkResponseTestContentEncoding(t *testing.T, content *[]byte, resp *httpt
func TestGetLFSSmall(t *testing.T) {
defer prepareTestEnv(t)()
- git.CheckLFSVersion()
- if !setting.LFS.StartServer {
- t.Skip()
- return
- }
content := []byte("A very small file\n")
resp := storeAndGetLfs(t, &content, nil, http.StatusOK)
@@ -96,11 +90,6 @@ func TestGetLFSSmall(t *testing.T) {
func TestGetLFSLarge(t *testing.T) {
defer prepareTestEnv(t)()
- git.CheckLFSVersion()
- if !setting.LFS.StartServer {
- t.Skip()
- return
- }
content := make([]byte, web.GzipMinSize*10)
for i := range content {
content[i] = byte(i % 256)
@@ -112,11 +101,6 @@ func TestGetLFSLarge(t *testing.T) {
func TestGetLFSGzip(t *testing.T) {
defer prepareTestEnv(t)()
- git.CheckLFSVersion()
- if !setting.LFS.StartServer {
- t.Skip()
- return
- }
b := make([]byte, web.GzipMinSize*10)
for i := range b {
b[i] = byte(i % 256)
@@ -133,11 +117,6 @@ func TestGetLFSGzip(t *testing.T) {
func TestGetLFSZip(t *testing.T) {
defer prepareTestEnv(t)()
- git.CheckLFSVersion()
- if !setting.LFS.StartServer {
- t.Skip()
- return
- }
b := make([]byte, web.GzipMinSize*10)
for i := range b {
b[i] = byte(i % 256)
@@ -156,11 +135,6 @@ func TestGetLFSZip(t *testing.T) {
func TestGetLFSRangeNo(t *testing.T) {
defer prepareTestEnv(t)()
- git.CheckLFSVersion()
- if !setting.LFS.StartServer {
- t.Skip()
- return
- }
content := []byte("123456789\n")
resp := storeAndGetLfs(t, &content, nil, http.StatusOK)
@@ -169,11 +143,6 @@ func TestGetLFSRangeNo(t *testing.T) {
func TestGetLFSRange(t *testing.T) {
defer prepareTestEnv(t)()
- git.CheckLFSVersion()
- if !setting.LFS.StartServer {
- t.Skip()
- return
- }
content := []byte("123456789\n")
tests := []struct {