1
1
mirror of https://github.com/go-gitea/gitea synced 2025-07-15 23:17:19 +00:00

Fix test code (#33829)

Do not use onGiteaRun if there is no git operation
This commit is contained in:
wxiaoguang
2025-03-11 05:45:42 +08:00
committed by GitHub
parent 7fa47de7e9
commit e47bba046c
6 changed files with 107 additions and 135 deletions

View File

@@ -4,7 +4,6 @@
package integration
import (
"net/url"
"strings"
"testing"
@@ -14,15 +13,17 @@ import (
"code.gitea.io/gitea/models/unittest"
user_model "code.gitea.io/gitea/models/user"
api "code.gitea.io/gitea/modules/structs"
"code.gitea.io/gitea/tests"
"github.com/stretchr/testify/assert"
)
func TestOrgCounts(t *testing.T) {
onGiteaRun(t, testOrgCounts)
defer tests.PrepareTestEnv(t)()
testOrgCounts(t)
}
func testOrgCounts(t *testing.T, u *url.URL) {
func testOrgCounts(t *testing.T) {
orgOwner := "user2"
orgName := "testOrg"
orgCollaborator := "user4"