mirror of
https://github.com/go-gitea/gitea.git
synced 2026-10-02 15:10:43 +02:00
Refactor some tests (#34580)
1. use `test.MockVariableValue` as much as possible 2. avoid `time.Sleep` as much as possible
This commit is contained in:
1 parent
c5e78fc7ad
commit
2a1585b32e
23 files changed
+58
-148
No files matched your search
@@ -87,7 +87,7 @@ func TestPackageGo(t *testing.T) {
|
||||
AddBasicAuth(user.Name)
|
||||
MakeRequest(t, req, http.StatusConflict)
|
||||
|
||||
time.Sleep(time.Second)
|
||||
time.Sleep(time.Second) // Ensure the timestamp is different, then the "list" below can have stable order
|
||||
|
||||
content = createArchive(map[string][]byte{
|
||||
packageName + "@" + packageVersion2 + "/go.mod": []byte(goModContent),
|
||||
|
||||
Reference in new issue
Block a user