channeldb: inject clock into database
Use our standard clock mock for database time queries.
This commit is contained in:
7 files changed
+29
-15
No files matched your search
@@ -317,7 +317,7 @@ func TestCancelInvoice(t *testing.T) {
|
||||
func TestSettleHoldInvoice(t *testing.T) {
|
||||
defer timeout()()
|
||||
|
||||
cdb, cleanup, err := newTestChannelDB()
|
||||
cdb, cleanup, err := newTestChannelDB(clock.NewTestClock(time.Time{}))
|
||||
if err != nil {
|
||||
t.Fatal(err)
|
||||
}
|
||||
@@ -497,7 +497,7 @@ func TestSettleHoldInvoice(t *testing.T) {
|
||||
func TestCancelHoldInvoice(t *testing.T) {
|
||||
defer timeout()()
|
||||
|
||||
cdb, cleanup, err := newTestChannelDB()
|
||||
cdb, cleanup, err := newTestChannelDB(clock.NewTestClock(time.Time{}))
|
||||
if err != nil {
|
||||
t.Fatal(err)
|
||||
}
|
||||
@@ -798,7 +798,7 @@ func TestMppPayment(t *testing.T) {
|
||||
func TestInvoiceExpiryWithRegistry(t *testing.T) {
|
||||
t.Parallel()
|
||||
|
||||
cdb, cleanup, err := newTestChannelDB()
|
||||
cdb, cleanup, err := newTestChannelDB(clock.NewTestClock(time.Time{}))
|
||||
defer cleanup()
|
||||
|
||||
if err != nil {
|
||||
|
||||
Reference in new issue
Block a user