tests(web): verify compressed files are not re-compressed
the test file used has a size below the default threshold and will never be compressed because of that, regardless of its extension. Reduce the threshold to 10 bytes otherwise the test is a false positive.
This commit is contained in:
parent
bd32dedb48
commit
a05eb66c99
2 changed files with 5 additions and 1 deletions
|
@ -11,6 +11,7 @@ import (
|
|||
"code.gitea.io/gitea/modules/setting"
|
||||
"code.gitea.io/gitea/modules/test"
|
||||
"code.gitea.io/gitea/routers"
|
||||
"code.gitea.io/gitea/routers/web"
|
||||
"code.gitea.io/gitea/tests"
|
||||
|
||||
"github.com/stretchr/testify/assert"
|
||||
|
@ -19,6 +20,7 @@ import (
|
|||
func TestRepoDownloadArchive(t *testing.T) {
|
||||
defer tests.PrepareTestEnv(t)()
|
||||
defer test.MockVariableValue(&setting.EnableGzip, true)()
|
||||
defer test.MockVariableValue(&web.GzipMinSize, 10)()
|
||||
defer test.MockVariableValue(&testWebRoutes, routers.NormalRoutes())()
|
||||
|
||||
req := NewRequest(t, "GET", "/user2/repo1/archive/master.zip")
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue