Skip to content

Commit cdd75f5

Browse files
committed
test_renepay.py: use test-specific temp dir, not /tmp
Changelog-None
1 parent fcd92fe commit cdd75f5

File tree

1 file changed

+4
-4
lines changed

1 file changed

+4
-4
lines changed

tests/test_renepay.py

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -355,7 +355,7 @@ def start_channels(connections):
355355
)
356356

357357

358-
def test_hardmpp(node_factory):
358+
def test_hardmpp(node_factory, directory):
359359
"""
360360
Topology:
361361
1----2----4
@@ -379,17 +379,17 @@ def test_hardmpp(node_factory):
379379
]
380380
)
381381

382-
with open("/tmp/l1-chans.txt", "w") as f:
382+
with open(os.path.join(directory, "l1-chans.txt"), "w") as f:
383383
print(json.dumps(l1.rpc.listchannels()), file=f)
384384

385385
inv = l4.rpc.invoice("any", "any", "description")
386386
l2.rpc.call("pay", {"bolt11": inv["bolt11"], "amount_msat": 2000000000})
387387
l2.wait_for_htlcs()
388388
assert l4.rpc.listinvoices()["invoices"][0]["amount_received_msat"] == 2000000000
389389

390-
with open("/tmp/l2-peerchan.txt", "w") as f:
390+
with open(os.path.join(directory, "l2-peerchan.txt"), "w") as f:
391391
print(json.dumps(l2.rpc.listpeerchannels()), file=f)
392-
with open("/tmp/l3-peerchan.txt", "w") as f:
392+
with open(os.path.join(directory, "l3-peerchan.txt"), "w") as f:
393393
print(json.dumps(l3.rpc.listpeerchannels()), file=f)
394394

395395
inv2 = l6.rpc.invoice("1800000sat", "inv2", "description")

0 commit comments

Comments
 (0)