tests: create run_tests() function in the scenario lib

This commit is contained in:
Jonas Nick
2020-08-02 21:20:51 +00:00
parent 3d2b366156
commit 6f9349b0a4
3 changed files with 81 additions and 73 deletions
+4
View File
@@ -1,3 +1,5 @@
run_tests()
## electrs
# the main test body stops electrs
succeed("systemctl start electrs")
@@ -5,10 +7,12 @@ machine.wait_for_open_port(4224) # prometeus metrics provider
## spark-wallet
machine.wait_for_open_port(9737)
spark_auth = re.search("login=(.*)", succeed("cat /secrets/spark-wallet-login"))[1]
assert_matches(f"curl -s {spark_auth}@localhost:9737", "Spark")
## lightning-charge
machine.wait_for_open_port(9112)
charge_auth = re.search("API_TOKEN=(.*)", succeed("cat /secrets/lightning-charge-env"))[1]
assert_matches(f"curl -s api-token:{charge_auth}@localhost:9112/info | jq", '"id"')
## nanopos