mirror of
https://github.com/go-gitea/gitea.git
synced 2024-05-11 05:55:29 +00:00
fix bug when push a branch name with / & fix an integration test bug (#1689)
This commit is contained in:
@ -94,11 +94,12 @@ func initIntegrationTest() {
|
||||
if err != nil {
|
||||
log.Fatalf("db.Query: %v", err)
|
||||
}
|
||||
if rows.Next() {
|
||||
break // database already exists
|
||||
}
|
||||
if _, err = db.Exec("CREATE DATABASE testgitea"); err != nil {
|
||||
log.Fatalf("db.Exec: %v", err)
|
||||
defer rows.Close()
|
||||
|
||||
if !rows.Next() {
|
||||
if _, err = db.Exec("CREATE DATABASE testgitea"); err != nil {
|
||||
log.Fatalf("db.Exec: %v", err)
|
||||
}
|
||||
}
|
||||
}
|
||||
routers.GlobalInit()
|
||||
|
Reference in New Issue
Block a user