forked from kevadesu/forgejo
chore: improve test quality
- Merge tests together. - Remove unecessary usage of `onGiteaRun`. - Make proper use of `unittest`. - Make proper use of `test.MockVariable`. - I have not checked all of the testing files yet.
This commit is contained in:
parent
ab36ab57e4
commit
582ab21bc3
18 changed files with 620 additions and 784 deletions
|
@ -5,26 +5,26 @@ package integration
|
|||
|
||||
import (
|
||||
"net/http"
|
||||
"net/url"
|
||||
"testing"
|
||||
|
||||
"code.gitea.io/gitea/tests"
|
||||
|
||||
"github.com/PuerkitoBio/goquery"
|
||||
"github.com/stretchr/testify/assert"
|
||||
)
|
||||
|
||||
func TestRepoMigrationUI(t *testing.T) {
|
||||
onGiteaRun(t, func(t *testing.T, giteaURL *url.URL) {
|
||||
sessionUser1 := loginUser(t, "user1")
|
||||
// Nothing is tested in plain Git migration form right now
|
||||
testRepoMigrationFormGitHub(t, sessionUser1)
|
||||
testRepoMigrationFormGitea(t, sessionUser1)
|
||||
testRepoMigrationFormGitLab(t, sessionUser1)
|
||||
testRepoMigrationFormGogs(t, sessionUser1)
|
||||
testRepoMigrationFormOneDev(t, sessionUser1)
|
||||
testRepoMigrationFormGitBucket(t, sessionUser1)
|
||||
testRepoMigrationFormCodebase(t, sessionUser1)
|
||||
testRepoMigrationFormForgejo(t, sessionUser1)
|
||||
})
|
||||
defer tests.PrepareTestEnv(t)()
|
||||
sessionUser1 := loginUser(t, "user1")
|
||||
// Nothing is tested in plain Git migration form right now
|
||||
testRepoMigrationFormGitHub(t, sessionUser1)
|
||||
testRepoMigrationFormGitea(t, sessionUser1)
|
||||
testRepoMigrationFormGitLab(t, sessionUser1)
|
||||
testRepoMigrationFormGogs(t, sessionUser1)
|
||||
testRepoMigrationFormOneDev(t, sessionUser1)
|
||||
testRepoMigrationFormGitBucket(t, sessionUser1)
|
||||
testRepoMigrationFormCodebase(t, sessionUser1)
|
||||
testRepoMigrationFormForgejo(t, sessionUser1)
|
||||
}
|
||||
|
||||
func testRepoMigrationFormGitHub(t *testing.T, session *TestSession) {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue