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

Unified Diff: build_scheduler/go/db/testutil.go

Issue 2246933002: Add Task DB implementation using a local BoltDB. (Closed) Base URL: https://skia.googlesource.com/buildbot@taskdb-impl-track
Patch Set: Fix bad merge. Created 4 years, 4 months 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: build_scheduler/go/db/testutil.go
diff --git a/build_scheduler/go/db/db_test.go b/build_scheduler/go/db/testutil.go
similarity index 95%
rename from build_scheduler/go/db/db_test.go
rename to build_scheduler/go/db/testutil.go
index 40e7605037b5b74a41320a1b21569150b57aed8d..a60ef816f0ce05c4ec8c1b557b240406678b3265 100644
--- a/build_scheduler/go/db/db_test.go
+++ b/build_scheduler/go/db/testutil.go
@@ -18,7 +18,7 @@ func makeTask(ts time.Time, commits []string) *Task {
}
}
-func testDB(t *testing.T, db DB) {
+func TestDB(t *testing.T, db DB) {
defer testutils.AssertCloses(t, db)
_, err := db.GetModifiedTasks("dummy-id")
@@ -150,7 +150,7 @@ func testDB(t *testing.T, db DB) {
testutils.AssertDeepEqual(t, []*Task{}, tasks)
}
-func testTooManyUsers(t *testing.T, db DB) {
+func TestTooManyUsers(t *testing.T, db DB) {
defer testutils.AssertCloses(t, db)
// Max out the number of modified-tasks users; ensure that we error out.
@@ -161,11 +161,3 @@ func testTooManyUsers(t *testing.T, db DB) {
_, err := db.StartTrackingModifiedTasks()
assert.True(t, IsTooManyUsers(err))
}
-
-func TestInMemoryDB(t *testing.T) {
- testDB(t, NewInMemoryDB())
-}
-
-func TestInMemoryTooManyUsers(t *testing.T) {
- testTooManyUsers(t, NewInMemoryDB())
-}
« build_scheduler/go/db/local_db/local_db.go ('K') | « build_scheduler/go/db/task_test.go ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698