-
Notifications
You must be signed in to change notification settings - Fork 144
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
test: move ln tests to top level bats #3593
Conversation
load "../../helpers/subscriber.bash" | ||
|
||
setup_file() { | ||
lnds_init |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Initialising the lightning setup should be done as part of tilt up IMO
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
fund_user_lightning 'alice' 'btc_wallet' '500000' | ||
|
||
subscribe_to 'alice' my-updates-sub | ||
sleep 3 |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Why sleep 3? Can we have a loop to detect when we're done. Sleep tends to be flaky.
btc_wallet_name="alice.btc_wallet_id" | ||
|
||
# Stop trigger | ||
# stop_trigger |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Comment?
|
||
# Start trigger | ||
# start_trigger | ||
sleep 5 |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
sleep?
lnd_outside_cli payinvoice -f \ | ||
--pay_req "$payment_request" \ | ||
--amt "$btc_amount" \ | ||
& |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
why is this backgrounded?
retry 15 1 check_for_ln_initiated_settled "$token_name" "$payment_hash" | ||
} | ||
|
||
lnds_init() { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This should probably be a setup step in the tilt file.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Added the file here #3718
This is probably the most important assertion of the test - can't merge with out it. |
Moves LN tests to top level bats
TODO: Make sure balance_for_check is readded