test: ensure harness nodes are connected before running each test
Due to some of the previous commits, we no longer have persistent connections to peers whom we have no open channels with. It might be the case that this is triggered throughout any of the tests, so we'll ensure that the Alice and Bob harnesses are connected before running each test.
This commit is contained in:
1 file changed
+8
@@ -10611,6 +10611,14 @@ func TestLightningNetworkDaemon(t *testing.T) {
|
||||
for _, testCase := range testsCases {
|
||||
logLine := fmt.Sprintf("STARTING ============ %v ============\n",
|
||||
testCase.name)
|
||||
|
||||
err := lndHarness.EnsureConnected(
|
||||
context.Background(), lndHarness.Alice, lndHarness.Bob,
|
||||
)
|
||||
if err != nil {
|
||||
t.Fatalf("unable to connect alice to bob: %v", err)
|
||||
}
|
||||
|
||||
if err := lndHarness.Alice.AddToLog(logLine); err != nil {
|
||||
t.Fatalf("unable to add to log: %v", err)
|
||||
}
|
||||
|
||||
Reference in new issue
Block a user