File tree Expand file tree Collapse file tree 2 files changed +32
-0
lines changed Expand file tree Collapse file tree 2 files changed +32
-0
lines changed Original file line number Diff line number Diff line change 1+ //go:build integration
2+
3+ package itest
4+
5+ import (
6+ "os/exec"
7+
8+ "github.com/lightningnetwork/lnd/lntest"
9+ "github.com/stretchr/testify/require"
10+ )
11+
12+ // testDebuglevelShow tests that "lnd --debuglevel=show" command works and
13+ // prints the list of supported subsystems.
14+ func testDebuglevelShow (ht * lntest.HarnessTest ) {
15+ // We can't use ht.NewNode, because it adds more arguments to the
16+ // command line (e.g. flags configuring bitcoin backend), but we want to
17+ // make sure that "lnd --debuglevel=show" works without any other flags.
18+ lndBinary := getLndBinary (ht .T )
19+ cmd := exec .Command (lndBinary , "--debuglevel=show" )
20+ stdoutStderrBytes , err := cmd .CombinedOutput ()
21+ require .NoError (ht , err , "failed to run 'lnd --debuglevel=show'" )
22+
23+ // Make sure that the output contains the list of supported subsystems
24+ // and that the list is not empty. We search PEER subsystem.
25+ stdoutStderr := string (stdoutStderrBytes )
26+ require .Contains (ht , stdoutStderr , "Supported subsystems" )
27+ require .Contains (ht , stdoutStderr , "PEER" )
28+ }
Original file line number Diff line number Diff line change @@ -702,4 +702,8 @@ var allTestCases = []*lntest.TestCase{
702702 Name : "send to route failed htlc timeout" ,
703703 TestFunc : testSendToRouteFailHTLCTimeout ,
704704 },
705+ {
706+ Name : "debuglevel show" ,
707+ TestFunc : testDebuglevelShow ,
708+ },
705709}
You can’t perform that action at this time.
0 commit comments