| 28 | (True, '0266e4598d1d3c415f572a8488830b60f7e744ed9235eb0b1ba93283b315c03518'), |
| 29 | ]) |
| 30 | def test_rpc_client(node_factory, old_hsmsecret, expected_node_id): |
| 31 | l1 = node_factory.get_node(old_hsmsecret=old_hsmsecret) |
| 32 | bin_path = Path.cwd() / "target" / RUST_PROFILE / "examples" / "cln-rpc-getinfo" |
| 33 | rpc_path = Path(l1.daemon.lightning_dir) / TEST_NETWORK / "lightning-rpc" |
| 34 | if len(str(rpc_path)) >= 108 and os.uname()[0] == 'Linux': |
| 35 | rpc_path = Path('/proc/self/cwd') / os.path.relpath(rpc_path) |
| 36 | out = subprocess.check_output([bin_path, rpc_path], stderr=subprocess.STDOUT) |
| 37 | # Check that the expected node ID appears in the output |
| 38 | assert expected_node_id.encode() in out |
| 39 | assert l1.info['id'] == expected_node_id |
| 40 | |
| 41 | |
| 42 | def test_plugin_start(node_factory): |