channeldb/graph test: add test for update policy for unknown edge
This commit is contained in:
parent
23ce82f4e3
commit
2b012b06a0
@ -729,6 +729,14 @@ func TestEdgeInfoUpdates(t *testing.T) {
|
|||||||
|
|
||||||
// Create an edge and add it to the db.
|
// Create an edge and add it to the db.
|
||||||
edgeInfo, edge1, edge2 := createChannelEdge(db, node1, node2)
|
edgeInfo, edge1, edge2 := createChannelEdge(db, node1, node2)
|
||||||
|
|
||||||
|
// Make sure inserting the policy at this point, before the edge info
|
||||||
|
// is added, will fail.
|
||||||
|
if err := graph.UpdateEdgePolicy(edge1); err != ErrEdgeNotFound {
|
||||||
|
t.Fatalf("expected ErrEdgeNotFound, got: %v", err)
|
||||||
|
}
|
||||||
|
|
||||||
|
// Add the edge info.
|
||||||
if err := graph.AddChannelEdge(edgeInfo); err != nil {
|
if err := graph.AddChannelEdge(edgeInfo); err != nil {
|
||||||
t.Fatalf("unable to create channel edge: %v", err)
|
t.Fatalf("unable to create channel edge: %v", err)
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user