Skip to content
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

Closed
wants to merge 6 commits into from
Closed

Conversation

sandipndev
Copy link
Member

@sandipndev sandipndev commented Nov 23, 2023

Moves LN tests to top level bats

TODO: Make sure balance_for_check is readded

@github-actions github-actions bot added the core label Nov 23, 2023
@github-actions github-actions bot removed the core label Nov 28, 2023
@github-actions github-actions bot added the core label Nov 29, 2023
@sandipndev sandipndev marked this pull request as ready for review November 29, 2023 09:16
load "../../helpers/subscriber.bash"

setup_file() {
lnds_init
Copy link
Member

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

Copy link
Contributor

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
Copy link
Member

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
Copy link
Member

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
Copy link
Member

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" \
&
Copy link
Member

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() {
Copy link
Member

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.

Copy link
Contributor

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

@bodymindarts
Copy link
Member

TODO: Make sure balance_for_check is readded

This is probably the most important assertion of the test - can't merge with out it.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants