mirror of
https://github.com/go-gitea/gitea
synced 2024-12-22 03:07:55 +01:00
Make TestCreateBranch and TestRepoCommitsSearch less noisy (#13471)
Signed-off-by: Andrew Thornton <art27@cantab.net> Co-authored-by: techknowlogick <techknowlogick@gitea.io>
This commit is contained in:
parent
8a7101fdd3
commit
271ab63dfa
@ -104,13 +104,12 @@ func testCreateBranches(t *testing.T, giteaURL *url.URL) {
|
|||||||
{
|
{
|
||||||
OldRefSubURL: "tag/v1.0.0",
|
OldRefSubURL: "tag/v1.0.0",
|
||||||
NewBranch: "feature/test4",
|
NewBranch: "feature/test4",
|
||||||
CreateRelease: "v1.0.0",
|
CreateRelease: "v1.0.1",
|
||||||
ExpectedStatus: http.StatusFound,
|
ExpectedStatus: http.StatusFound,
|
||||||
FlashMessage: i18n.Tr("en", "repo.branch.create_success", "feature/test4"),
|
FlashMessage: i18n.Tr("en", "repo.branch.create_success", "feature/test4"),
|
||||||
},
|
},
|
||||||
}
|
}
|
||||||
for _, test := range tests {
|
for _, test := range tests {
|
||||||
defer prepareTestEnv(t)()
|
|
||||||
session := loginUser(t, "user2")
|
session := loginUser(t, "user2")
|
||||||
if test.CreateRelease != "" {
|
if test.CreateRelease != "" {
|
||||||
createNewRelease(t, session, "/user2/repo1", test.CreateRelease, test.CreateRelease, false, false)
|
createNewRelease(t, session, "/user2/repo1", test.CreateRelease, test.CreateRelease, false, false)
|
||||||
|
@ -14,8 +14,6 @@ import (
|
|||||||
)
|
)
|
||||||
|
|
||||||
func testRepoCommitsSearch(t *testing.T, query, commit string) {
|
func testRepoCommitsSearch(t *testing.T, query, commit string) {
|
||||||
defer prepareTestEnv(t)()
|
|
||||||
|
|
||||||
session := loginUser(t, "user2")
|
session := loginUser(t, "user2")
|
||||||
|
|
||||||
// Request repository commits page
|
// Request repository commits page
|
||||||
@ -28,6 +26,7 @@ func testRepoCommitsSearch(t *testing.T, query, commit string) {
|
|||||||
}
|
}
|
||||||
|
|
||||||
func TestRepoCommitsSearch(t *testing.T) {
|
func TestRepoCommitsSearch(t *testing.T) {
|
||||||
|
defer prepareTestEnv(t)()
|
||||||
testRepoCommitsSearch(t, "e8eabd", "")
|
testRepoCommitsSearch(t, "e8eabd", "")
|
||||||
testRepoCommitsSearch(t, "38a9cb", "")
|
testRepoCommitsSearch(t, "38a9cb", "")
|
||||||
testRepoCommitsSearch(t, "6e8e", "6e8eabd9a7")
|
testRepoCommitsSearch(t, "6e8e", "6e8eabd9a7")
|
||||||
|
Loading…
Reference in New Issue
Block a user