lnd/autopilot
Elle Mouton dc353dc50e
multi: use MakeTestGraph everywhere for test graph creation
In this commit, we unify how all unit tests that make use of the graph
create their test ChannelGraph instance. This will make it easier to
ensure that once we plug in different graph DB implementations, that all
unit tests are run against all variants of the graph DB.

With this commit, `NewChannelGraph` is mainly only called via
`MakeTestGraph` for all tests _except_ for `TestGraphLoading` which
needs to be able to reload a ChannelGraph with the same backend. This
will be addressed in a follow-up commit once more helpers are defined.

Note that in all previous packages where we created a test graph using
`kvdb.GetBoltBackend`, we now need to add a `TestMain` function with a
call to `kvdb.RunTest` since the `MakeTestGraph` helper uses
`GetTestBackend` instead of `kvdb.GetBoltBackend` which requires an
embedded postgres instance to be running.
2025-05-22 14:14:42 +02:00
..
agent.go autopilot: revert passing ctx to Start methods 2025-05-22 14:14:40 +02:00
agent_constraints.go trivial: Fix spelling errors 2023-09-21 22:35:33 -04:00
agent_constraints_test.go multi: use btcd's btcec/v2 and btcutil modules 2022-03-09 19:02:37 +01:00
agent_test.go autopilot: revert passing ctx to Start methods 2025-05-22 14:14:40 +02:00
betweenness_centrality.go autopilot: continue threading context 2025-05-22 14:14:38 +02:00
betweenness_centrality_test.go autopilot: continue threading context 2025-05-22 14:14:38 +02:00
centrality_testdata_test.go multi: use btcd's btcec/v2 and btcutil modules 2022-03-09 19:02:37 +01:00
choice.go multi: Fix typos [skip ci] 2022-01-24 12:19:02 +02:00
choice_test.go chore: fix struct names 2024-04-17 11:19:31 +08:00
combinedattach.go autopilot: update AttachmentHeuristics with context 2025-05-22 14:14:38 +02:00
externalscoreattach.go autopilot: update AttachmentHeuristics with context 2025-05-22 14:14:38 +02:00
externalscoreattach_test.go autopilot: update AttachmentHeuristics with context 2025-05-22 14:14:38 +02:00
graph.go autopilot: start threading contexts through 2025-05-22 14:14:38 +02:00
graph_test.go multi: use btcd's btcec/v2 and btcutil modules 2022-03-09 19:02:37 +01:00
interface.go autopilot: update AttachmentHeuristics with context 2025-05-22 14:14:38 +02:00
log.go multi: start updating various loggers to use the new v2 type 2024-10-22 17:03:55 +02:00
manager.go autopilot: revert passing ctx to Start methods 2025-05-22 14:14:40 +02:00
prefattach.go autopilot: update AttachmentHeuristics with context 2025-05-22 14:14:38 +02:00
prefattach_test.go multi: use MakeTestGraph everywhere for test graph creation 2025-05-22 14:14:42 +02:00
setup_test.go multi: use MakeTestGraph everywhere for test graph creation 2025-05-22 14:14:42 +02:00
simple_graph.go autopilot: start threading contexts through 2025-05-22 14:14:38 +02:00
simple_graph_test.go lnrpc+autopilot: add graph diameter calculation 2022-03-07 11:15:47 +01:00
top_centrality.go autopilot: update AttachmentHeuristics with context 2025-05-22 14:14:38 +02:00
top_centrality_test.go autopilot: update AttachmentHeuristics with context 2025-05-22 14:14:38 +02:00