Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(165)

Unified Diff: go/database/testutil/testutil.go

Issue 813443002: Overhaul database package (Closed) Base URL: https://skia.googlesource.com/buildbot@master
Patch Set: Created 6 years ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
Index: go/database/testutil/testutil.go
diff --git a/go/database/testutil/testutil.go b/go/database/testutil/testutil.go
index cebea84683c5363dc4297580d7141aad933f23af..bf025860b6a943c8c2488040ee00858db99d101b 100644
--- a/go/database/testutil/testutil.go
+++ b/go/database/testutil/testutil.go
@@ -20,27 +20,10 @@ const (
// parameters are: username, password, database.
MYSQL_DB_OPEN = "%s:%s@tcp(localhost:3306)/%s?parseTime=true"
- // File path to the local SQLite testing databse.
- SQLITE_DB_PATH = "./testing.db"
-
// Name of the MySQL lock
SQL_LOCK = "mysql_testlock"
)
-// Creates an SQLite test database and runs migration tests against it using the
-// given migration steps.
-func SQLiteVersioningTests(t *testing.T, migrationSteps []database.MigrationStep) {
- // Initialize without argument to test against SQLite3
- conf := &database.DatabaseConfig{
- SQLiteFilePath: SQLITE_DB_PATH,
- MigrationSteps: migrationSteps,
- }
-
- vdb := database.NewVersionedDB(conf)
- assert.False(t, vdb.IsMySQL)
- testDBVersioning(t, vdb)
-}
-
// Creates an MySQL test database and runs migration tests against it using the
// given migration steps. See Get for required credentials.
// The test assumes that the database is empty and that the readwrite user is
@@ -58,7 +41,6 @@ func MySQLVersioningTests(t *testing.T, dbName string, migrationSteps []database
}()
rootVdb := database.NewVersionedDB(rootConf)
- assert.True(t, rootVdb.IsMySQL)
ClearMySQLTables(t, rootVdb)
assert.Nil(t, rootVdb.Close())
« no previous file with comments | « go/database/database.go ('k') | golden/go/db/db.go » ('j') | golden/go/db/db.go » ('J')

Powered by Google App Engine
This is Rietveld 408576698