multi: use MakeTestGraphNew for all remaining unit tests
And delete the old MakeTestGraph function. Here we need to update some of our unit tests to ensure that any updates to existing nodes or channel policies have newer timestamps. This is so that we don't violate our SQL DB constraints that prevent updates to a node or channel policy record if the new update is not newer (has a newer LastUpdate time) than the currently presisted record).
This commit is contained in:
6 files changed
+50
-65
No files matched your search
@@ -763,7 +763,7 @@ func TestNodeUpdateNotification(t *testing.T) {
|
||||
// then it should trigger a new notification.
|
||||
// TODO(roasbeef): assume monotonic time.
|
||||
nodeUpdateAnn := *node1
|
||||
nodeUpdateAnn.LastUpdate = node1.LastUpdate.Add(300 * time.Millisecond)
|
||||
nodeUpdateAnn.LastUpdate = node1.LastUpdate.Add(time.Second)
|
||||
|
||||
// Add new node topology update to the channel router.
|
||||
if err := ctx.builder.AddNode(ctxb, &nodeUpdateAnn); err != nil {
|
||||
@@ -1059,7 +1059,7 @@ type testCtx struct {
|
||||
func createTestCtxSingleNode(t *testing.T,
|
||||
startingHeight uint32) *testCtx {
|
||||
|
||||
graph := graphdb.MakeTestGraph(t)
|
||||
graph := graphdb.MakeTestGraphNew(t)
|
||||
sourceNode := createTestNode(t)
|
||||
|
||||
require.NoError(t,
|
||||
|
||||
Reference in new issue
Block a user