channeldb/graph test: add test for update policy for unknown edge

This commit is contained in:
Johan T. Halseth 2019-01-28 09:06:48 +01:00
parent 23ce82f4e3
commit 2b012b06a0
No known key found for this signature in database
GPG Key ID: 15BAADA29DA20D26

@ -729,6 +729,14 @@ func TestEdgeInfoUpdates(t *testing.T) {
// Create an edge and add it to the db.
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 {
t.Fatalf("unable to create channel edge: %v", err)
}