mirror of
https://github.com/lightningnetwork/lnd.git
synced 2025-10-10 05:52:39 +02:00
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:
@@ -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)
|
||||
|
Reference in New Issue
Block a user