diff options
author | Ethan Koenig <etk39@cornell.edu> | 2017-05-11 11:32:43 -0400 |
---|---|---|
committer | Bo-Yi Wu <appleboy.tw@gmail.com> | 2017-05-11 23:32:43 +0800 |
commit | 251fb935ff39520482a5436b19bc04352ea25db7 (patch) | |
tree | ffbd8d05abbc4354d499741c7aa22d9a48230121 /integrations | |
parent | ddb63a789737a7b0ffa11693c6160c195de5d2dc (diff) | |
download | gitea-251fb935ff39520482a5436b19bc04352ea25db7.tar.gz gitea-251fb935ff39520482a5436b19bc04352ea25db7.zip |
Don't recreate database in integration tests (#1697)
Diffstat (limited to 'integrations')
-rw-r--r-- | integrations/integration_test.go | 7 |
1 files changed, 1 insertions, 6 deletions
diff --git a/integrations/integration_test.go b/integrations/integration_test.go index 1bac2c1964..88b4614b76 100644 --- a/integrations/integration_test.go +++ b/integrations/integration_test.go @@ -79,9 +79,6 @@ func initIntegrationTest() { if err != nil { log.Fatalf("sql.Open: %v", err) } - if _, err = db.Exec("DROP DATABASE IF EXISTS testgitea"); err != nil { - log.Fatalf("db.drop db: %v", err) - } if _, err = db.Exec("CREATE DATABASE IF NOT EXISTS testgitea"); err != nil { log.Fatalf("db.Exec: %v", err) } @@ -100,9 +97,7 @@ func initIntegrationTest() { defer rows.Close() if rows.Next() { - if _, err = db.Exec("DROP DATABASE testgitea"); err != nil { - log.Fatalf("db.drop db: %v", err) - } + break } if _, err = db.Exec("CREATE DATABASE testgitea"); err != nil { log.Fatalf("db.Exec: %v", err) |