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 2018-06-15 12:35:12 -07:00
parent e3162605be
commit b70319e0d6
No known key found for this signature in database
GPG Key ID: 6DF57B9F9514972F

View File

@ -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)
} }