satellite/satellitedb: move tests near the interface (#2863)
This commit is contained in:
parent
4e16a5c598
commit
6ff94caf22
@ -1,7 +1,7 @@
|
||||
// Copyright (C) 2019 Storj Labs, Inc.
|
||||
// See LICENSE for copying information.
|
||||
|
||||
package satellitedb_test
|
||||
package console_test
|
||||
|
||||
import (
|
||||
"context"
|
||||
@ -19,7 +19,7 @@ import (
|
||||
"storj.io/storj/satellite/satellitedb/satellitedbtest"
|
||||
)
|
||||
|
||||
func TestUsercredits(t *testing.T) {
|
||||
func TestUserCredits(t *testing.T) {
|
||||
satellitedbtest.Run(t, func(t *testing.T, db satellite.DB) {
|
||||
ctx := testcontext.New(t)
|
||||
defer ctx.Cleanup()
|
@ -1,7 +1,7 @@
|
||||
// Copyright (C) 2019 Storj Labs, Inc.
|
||||
// See LICENSE for copying information.
|
||||
|
||||
package satellitedb_test
|
||||
package queue_test
|
||||
|
||||
import (
|
||||
"context"
|
||||
@ -21,7 +21,7 @@ import (
|
||||
"storj.io/storj/storage"
|
||||
)
|
||||
|
||||
func TestRepairQueue(t *testing.T) {
|
||||
func TestUntilEmpty(t *testing.T) {
|
||||
satellitedbtest.Run(t, func(t *testing.T, db satellite.DB) {
|
||||
ctx := testcontext.New(t)
|
||||
defer ctx.Cleanup()
|
||||
@ -54,7 +54,7 @@ func TestRepairQueue(t *testing.T) {
|
||||
})
|
||||
}
|
||||
|
||||
func TestRepairQueueOrder(t *testing.T) {
|
||||
func TestOrder(t *testing.T) {
|
||||
satellitedbtest.Run(t, func(t *testing.T, db satellite.DB) {
|
||||
ctx := testcontext.New(t)
|
||||
defer ctx.Cleanup()
|
||||
@ -72,6 +72,7 @@ func TestRepairQueueOrder(t *testing.T) {
|
||||
require.NoError(t, err)
|
||||
}
|
||||
|
||||
// TODO: remove dependency on *dbx.DB
|
||||
dbAccess := db.(interface{ TestDBAccess() *dbx.DB }).TestDBAccess()
|
||||
var timeConvertPrefix string
|
||||
switch d := dbAccess.DB.Driver().(type) {
|
||||
@ -129,7 +130,7 @@ func TestRepairQueueOrder(t *testing.T) {
|
||||
})
|
||||
}
|
||||
|
||||
func TestRepairQueueCount(t *testing.T) {
|
||||
func TestCount(t *testing.T) {
|
||||
satellitedbtest.Run(t, func(t *testing.T, db satellite.DB) {
|
||||
ctx := testcontext.New(t)
|
||||
defer ctx.Cleanup()
|
Loading…
Reference in New Issue
Block a user