Skip to content

Commit

Permalink
chore: added redis flush
Browse files Browse the repository at this point in the history
  • Loading branch information
siddhart1o1 committed Jan 10, 2024
1 parent 9702086 commit 5d03317
Show file tree
Hide file tree
Showing 4 changed files with 9 additions and 0 deletions.
1 change: 1 addition & 0 deletions tests/e2e/01-authenticate.bats
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,7 @@ setup_file() {
}

@test "auth: login/logout A and set username" {
redis_cli FLUSHALL > /dev/null 2>&1 || true
login_user A
galoy_cli_cmd set-username --username ${USER_A_USERNAME}
username=$(galoy_cli_cmd me | jq -r '.username')
Expand Down
3 changes: 3 additions & 0 deletions tests/e2e/03-send.bats
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,7 @@ setup_file() {
}

@test "send(intraledger, btc): sats deducted from A's wallet and received by B" {
redis_cli FLUSHALL > /dev/null 2>&1 || true
fund_user "A" "btc" 0.1

login_user B
Expand All @@ -31,6 +32,7 @@ setup_file() {
}

@test "send(intraledger, usd): cents deducted from B's wallet and received by A" {
redis_cli FLUSHALL > /dev/null 2>&1 || true
fund_user "B" "usd" 0.1

login_user A
Expand All @@ -54,6 +56,7 @@ setup_file() {
}

@test "batch(A, B, C): submit batch from A to B and C" {
redis_cli FLUSHALL > /dev/null 2>&1 || true
fund_user "A" "usd" 0.01

login_user B
Expand Down
1 change: 1 addition & 0 deletions tests/e2e/04-wallet.bats
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,7 @@ setup_file() {
}

@test "wallet: update default wallet" {
redis_cli FLUSHALL > /dev/null 2>&1 || true
login_user A

default_wallet_id=$(get_default_wallet_id)
Expand Down
4 changes: 4 additions & 0 deletions tests/e2e/helpers.bash
Original file line number Diff line number Diff line change
Expand Up @@ -104,3 +104,7 @@ fund_user() {
logout_user
[[ "$retries" != "30" ]] || exit 1
}

redis_cli() {
docker exec "${COMPOSE_PROJECT_NAME}-redis-1" redis-cli $@
}

0 comments on commit 5d03317

Please sign in to comment.