-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
aa5ee52
commit bdef293
Showing
4 changed files
with
49 additions
and
31 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,11 +1,34 @@ | ||
#!/usr/bin/python | ||
|
||
import time | ||
from pathlib import Path | ||
|
||
from pyln.testing.fixtures import * # noqa: F403 | ||
from util import get_plugin # noqa: F401 | ||
|
||
|
||
def test_basic(node_factory, get_plugin): # noqa: F811 | ||
node = node_factory.get_node( | ||
options={"plugin": get_plugin, "vitality-fail": "lol"} | ||
) | ||
node = node_factory.get_node() | ||
lightning_dir = Path(node.rpc.call("getinfo")["lightning-dir"]) | ||
config_file = lightning_dir / "config" | ||
option_lines = [ | ||
"vitality-amboss=true\n", | ||
"vitality-expiring-htlcs=50\n", | ||
"vitality-watch-channels=true\n", | ||
"vitality-watch-gossip=true\n", | ||
"vitality-telegram-token=4582169472:Og4grGKROE3OR-x-O3kfOsks\n", | ||
"vitality-telegram-usernames=936723718\n", | ||
"[email protected]\n", | ||
"vitality-smtp-password=WEJF§IFJseo32\n", | ||
"vitality-smtp-server=mail.gmx.net\n", | ||
"vitality-smtp-port=587\n", | ||
"[email protected]\n", | ||
"[email protected]\n", | ||
] | ||
|
||
with config_file.open(mode="a") as file: | ||
file.writelines(option_lines) | ||
|
||
node.rpc.call("plugin", {"subcommand": "start", "plugin": str(get_plugin)}) | ||
node.daemon.wait_for_log(r"Error in amboss_ping") | ||
time.sleep(5) | ||
assert node.daemon.is_in_log(r"check_channel: All good.") |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters