Skip to content

Commit 4aadc52

Browse files
committed
fix logging test - enable lnd to satisfy metric
fix proc exception, add --debug command support
1 parent d509de0 commit 4aadc52

File tree

3 files changed

+13
-3
lines changed

3 files changed

+13
-3
lines changed

test/data/logging/network.yaml

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,13 @@ nodes:
1212
addnode:
1313
- tank-0000
1414
lnd:
15-
enabled: true
15+
channels:
16+
- id:
17+
block: 300
18+
index: 1
19+
target: tank-0001-ln
20+
capacity: 100000
21+
push_amt: 50000
1622
metricsExport: true
1723
prometheusMetricsPort: 9332
1824
extraContainers:

test/data/logging/node-defaults.yaml

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3,3 +3,6 @@ image:
33
repository: bitcoindevproject/bitcoin
44
pullPolicy: IfNotPresent
55
tag: "27.0"
6+
7+
lnd:
8+
enabled: true

test/test_base.py

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -68,10 +68,11 @@ def assert_log_msgs(self):
6868
def warnet(self, cmd):
6969
self.log.debug(f"Executing warnet command: {cmd}")
7070
command = ["warnet"] + cmd.split()
71-
proc = run(command, capture_output=True)
71+
capture_output = "--debug" not in cmd
72+
proc = run(command, capture_output=capture_output)
7273
if proc.stderr:
7374
raise Exception(proc.stderr.decode().strip())
74-
return proc.stdout.decode().strip()
75+
return proc.stdout.decode().strip() if proc.stdout else ""
7576

7677
def output_reader(self, pipe, func):
7778
while not self.stop_threads.is_set():

0 commit comments

Comments
 (0)