10
10
recurringdonations_ip = "169.254.1.20"
11
11
nginx_ip = "169.254.1.21"
12
12
lightningloop_ip = "169.254.1.22"
13
+ nbxplorer_ip = "169.254.1.23"
14
+ btcpayserver_ip = "169.254.1.24"
13
15
14
16
15
17
def electrs ():
@@ -18,6 +20,20 @@ def electrs():
18
20
) # prometeus metrics provider
19
21
20
22
23
+ def nbxplorer ():
24
+ machine .wait_until_succeeds ("ip netns exec nb-nbxplorer nc -z %s 24444" % nbxplorer_ip )
25
+
26
+
27
+ def btcpayserver ():
28
+ machine .wait_until_succeeds ("ip netns exec nb-btcpayserver nc -z %s 23000" % btcpayserver_ip )
29
+ # test lnd custom macaroon
30
+ assert_matches (
31
+ 'ip netns exec nb-btcpayserver sudo -u btcpayserver curl -s --cacert /secrets/lnd-cert --header "Grpc-Metadata-macaroon: $(xxd -ps -u -c 1000 /run/lnd/btcpayserver.macaroon)" -X GET https://%s:8080/v1/getinfo | jq'
32
+ % lnd_ip ,
33
+ '"version"' ,
34
+ )
35
+
36
+
21
37
def spark_wallet ():
22
38
machine .wait_until_succeeds ("ip netns exec nb-spark-wallet nc -z %s 9737" % sparkwallet_ip )
23
39
spark_auth = re .search ("login=(.*)" , succeed ("cat /secrets/spark-wallet-login" ))[1 ]
@@ -50,13 +66,16 @@ def web_index():
50
66
def prestop ():
51
67
ping_bitcoind = "ip netns exec nb-bitcoind ping -c 1 -w 1"
52
68
ping_nanopos = "ip netns exec nb-nanopos ping -c 1 -w 1"
69
+ ping_nbxplorer = "ip netns exec nb-nbxplorer ping -c 1 -w 1"
53
70
54
71
# Positive ping tests (non-exhaustive)
55
72
machine .succeed (
56
73
"%s %s &&" % (ping_bitcoind , bitcoind_ip )
57
74
+ "%s %s &&" % (ping_bitcoind , clightning_ip )
58
75
+ "%s %s &&" % (ping_bitcoind , lnd_ip )
59
76
+ "%s %s &&" % (ping_bitcoind , liquidd_ip )
77
+ + "%s %s &&" % (ping_bitcoind , nbxplorer_ip )
78
+ + "%s %s &&" % (ping_nbxplorer , btcpayserver_ip )
60
79
+ "%s %s &&" % (ping_nanopos , lightningcharge_ip )
61
80
+ "%s %s &&" % (ping_nanopos , nanopos_ip )
62
81
+ "%s %s" % (ping_nanopos , nginx_ip )
@@ -77,7 +96,8 @@ def prestop():
77
96
+ "%s %s ||" % (ping_nanopos , liquidd_ip )
78
97
+ "%s %s ||" % (ping_nanopos , electrs_ip )
79
98
+ "%s %s ||" % (ping_nanopos , sparkwallet_ip )
80
- + "%s %s" % (ping_nanopos , recurringdonations_ip )
99
+ + "%s %s ||" % (ping_nanopos , recurringdonations_ip )
100
+ + "%s %s" % (ping_nanopos , btcpayserver_ip )
81
101
)
82
102
83
103
# test that netns-exec can't be run for unauthorized namespace
@@ -94,6 +114,8 @@ def prestop():
94
114
95
115
extra_tests = {
96
116
"electrs" : electrs ,
117
+ "nbxplorer" : nbxplorer ,
118
+ "btcpayserver" : btcpayserver ,
97
119
"spark-wallet" : spark_wallet ,
98
120
"lightning-charge" : lightning_charge ,
99
121
"nanopos" : nanopos ,
0 commit comments