mirror of
https://github.com/lightningnetwork/lnd.git
synced 2024-11-19 09:53:54 +01:00
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:
parent
e3162605be
commit
b70319e0d6
@ -10611,6 +10611,14 @@ func TestLightningNetworkDaemon(t *testing.T) {
|
|||||||
for _, testCase := range testsCases {
|
for _, testCase := range testsCases {
|
||||||
logLine := fmt.Sprintf("STARTING ============ %v ============\n",
|
logLine := fmt.Sprintf("STARTING ============ %v ============\n",
|
||||||
testCase.name)
|
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 {
|
if err := lndHarness.Alice.AddToLog(logLine); err != nil {
|
||||||
t.Fatalf("unable to add to log: %v", err)
|
t.Fatalf("unable to add to log: %v", err)
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user