fix bug when push a branch name with / & fix an integration test bug (#1689)
This commit is contained in:
parent
79494047b0
commit
2bb8b3a562
4 changed files with 53 additions and 7 deletions
|
@ -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()
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue