Skip to content

Commit

Permalink
test(core): move integration lnd health check to bats
Browse files Browse the repository at this point in the history
  • Loading branch information
vindard committed Jan 29, 2024
1 parent af051a6 commit ca49de7
Show file tree
Hide file tree
Showing 4 changed files with 16 additions and 38 deletions.
7 changes: 0 additions & 7 deletions bats/core/api/onchain-send.bats
Original file line number Diff line number Diff line change
Expand Up @@ -25,13 +25,6 @@ teardown() {
fi
}

grep_in_trigger_logs() {
cat_trigger \
| awk -F'' '{print $2}' \
| grep $1
return "$?"
}

wait_for_new_payout_id() {
prior_id="$1"

Expand Down
9 changes: 9 additions & 0 deletions bats/core/api/trigger.bats
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
load "../../helpers/trigger.bash"

@test "trigger: lnds health check" {
num_lnd1_starts=$(grep_in_trigger_logs "localhost:10009.*lnd.*started" | wc -l)
[[ "$num_lnd1_starts" == "1" ]] || exit 1

num_lnd2_starts=$(grep_in_trigger_logs "localhost:10010.*lnd.*started" | wc -l)
[[ "$num_lnd2_starts" == "1" ]] || exit 1
}
7 changes: 7 additions & 0 deletions bats/helpers/trigger.bash
Original file line number Diff line number Diff line change
Expand Up @@ -23,3 +23,10 @@ trigger_is_started() {
cat_trigger() {
cat "$TILT_LOG_FILE" | grep 'api-trigger │ '
}

grep_in_trigger_logs() {
cat_trigger \
| awk -F'' '{print $2}' \
| grep $1
return "$?"
}
31 changes: 0 additions & 31 deletions core/api/test/legacy-integration/services/lnd/health.spec.ts

This file was deleted.

0 comments on commit ca49de7

Please sign in to comment.