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:
Wilmer Paulino committed 2018-07-17 17:35:34 -07:00
1 parent e3162605be
commit b70319e0d6
1 file changed
+8
+8
View File
@@ -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)
}