mirror of
https://github.com/lightninglabs/lightning-terminal.git
synced 2026-08-13 12:33:36 +02:00
mutli: rename db.NewTestPostgresV2DB function
As the legacy `NewTestPostgresDB` function is no longer used and has been removed, it no longer makes sense to have a `V2` suffix on the `NewTestPostgresV2DB` function. This commit renames it to `NewTestPostgresDB`, to indicate that this function now replaces the legacy function.
This commit is contained in:
parent
03f4261714
commit
eb26c2b1c5
4 changed files with 9 additions and 9 deletions
|
|
@ -16,7 +16,7 @@ var ErrDBClosed = errors.New("database is closed")
|
|||
|
||||
// NewTestDB is a helper function that creates an SQLStore database for testing.
|
||||
func NewTestDB(t *testing.T, clock clock.Clock) Store {
|
||||
return createStore(t, db.NewTestPostgresV2DB(t).BaseDB, clock)
|
||||
return createStore(t, db.NewTestPostgresDB(t).BaseDB, clock)
|
||||
}
|
||||
|
||||
// NewTestDBFromPath is a helper function that creates a new SQLStore with a
|
||||
|
|
@ -24,5 +24,5 @@ func NewTestDB(t *testing.T, clock clock.Clock) Store {
|
|||
func NewTestDBFromPath(t *testing.T, dbPath string,
|
||||
clock clock.Clock) Store {
|
||||
|
||||
return createStore(t, db.NewTestPostgresV2DB(t).BaseDB, clock)
|
||||
return createStore(t, db.NewTestPostgresDB(t).BaseDB, clock)
|
||||
}
|
||||
|
|
|
|||
|
|
@ -56,9 +56,9 @@ func (s *PostgresConfig) DSN(hidePassword bool) string {
|
|||
s.DBName, sslMode)
|
||||
}
|
||||
|
||||
// NewTestPostgresV2DB is a helper function that creates a Postgres database for
|
||||
// testing, using the sqldb v2 package's definition of the PostgresStore.
|
||||
func NewTestPostgresV2DB(t *testing.T) *sqldb.PostgresStore {
|
||||
// NewTestPostgresDB is a helper function that creates a Postgres database for
|
||||
// testing.
|
||||
func NewTestPostgresDB(t *testing.T) *sqldb.PostgresStore {
|
||||
t.Helper()
|
||||
|
||||
t.Logf("Creating new Postgres DB for testing")
|
||||
|
|
|
|||
|
|
@ -14,11 +14,11 @@ var isSqlite = false
|
|||
|
||||
// NewTestDB is a helper function that creates an BBolt database for testing.
|
||||
func NewTestDB(t *testing.T, clock clock.Clock) FirewallDBs {
|
||||
return createStore(t, db.NewTestPostgresV2DB(t).BaseDB, clock)
|
||||
return createStore(t, db.NewTestPostgresDB(t).BaseDB, clock)
|
||||
}
|
||||
|
||||
// NewTestDBFromPath is a helper function that creates a new BoltStore with a
|
||||
// connection to an existing BBolt database for testing.
|
||||
func NewTestDBFromPath(t *testing.T, _ string, clock clock.Clock) FirewallDBs {
|
||||
return createStore(t, db.NewTestPostgresV2DB(t).BaseDB, clock)
|
||||
return createStore(t, db.NewTestPostgresDB(t).BaseDB, clock)
|
||||
}
|
||||
|
|
|
|||
|
|
@ -16,7 +16,7 @@ var ErrDBClosed = errors.New("database is closed")
|
|||
|
||||
// NewTestDB is a helper function that creates an SQLStore database for testing.
|
||||
func NewTestDB(t *testing.T, clock clock.Clock) Store {
|
||||
return createStore(t, db.NewTestPostgresV2DB(t).BaseDB, clock)
|
||||
return createStore(t, db.NewTestPostgresDB(t).BaseDB, clock)
|
||||
}
|
||||
|
||||
// NewTestDBFromPath is a helper function that creates a new SQLStore with a
|
||||
|
|
@ -24,5 +24,5 @@ func NewTestDB(t *testing.T, clock clock.Clock) Store {
|
|||
func NewTestDBFromPath(t *testing.T, dbPath string,
|
||||
clock clock.Clock) Store {
|
||||
|
||||
return createStore(t, db.NewTestPostgresV2DB(t).BaseDB, clock)
|
||||
return createStore(t, db.NewTestPostgresDB(t).BaseDB, clock)
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue