lnd_test: add name of testcase to node's logfile

This commit adds a line of text including a test case's
name to Alice's and Bob's logfiles during integration
tests, making it easier to seek for the place in the log
where the specific tests start.
This commit is contained in:
Johan T. Halseth
2018-01-09 12:59:32 +01:00
parent 87dee4b15a
commit 4a1a9d6b14

View File

@@ -4847,6 +4847,15 @@ func TestLightningNetworkDaemon(t *testing.T) {
t.Logf("Running %v integration tests", len(testsCases))
for _, testCase := range testsCases {
logLine := fmt.Sprintf("STARTING ============ %v ============\n",
testCase.name)
if err := lndHarness.Alice.AddToLog(logLine); err != nil {
t.Fatalf("unable to add to log: %v", err)
}
if err := lndHarness.Bob.AddToLog(logLine); err != nil {
t.Fatalf("unable to add to log: %v", err)
}
success := t.Run(testCase.name, func(t1 *testing.T) {
ht := newHarnessTest(t1)
ht.RunTestCase(testCase, lndHarness)