Skip to content

Commit

Permalink
fix(ci): run most lighwalletd tests correctly (#9038)
Browse files Browse the repository at this point in the history
A LWD test was expecting the `ZEBRA_TEST_LIGHTWALLETD` to be set, but this variable is needed for all LWD tests and not specifically for `lightwalletd_integration`.

We had to rename this variable on a buggy `elif` statement in our Docker entrypoint.

This was avoiding most LWD tests to run correctly.
  • Loading branch information
gustavovalverde authored Nov 19, 2024
1 parent 17648cc commit 3983428
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 6 deletions.
2 changes: 1 addition & 1 deletion .github/workflows/sub-ci-unit-tests-docker.yml
Original file line number Diff line number Diff line change
Expand Up @@ -138,7 +138,7 @@ jobs:
NETWORK: ${{ inputs.network || vars.ZCASH_NETWORK }}
run: |
docker pull ${{ vars.GAR_BASE }}/${{ vars.CI_IMAGE_NAME }}@${{ inputs.image_digest }}
docker run --tty -e NETWORK -e ZEBRA_TEST_LIGHTWALLETD=1 ${{ vars.GAR_BASE }}/${{ vars.CI_IMAGE_NAME }}@${{ inputs.image_digest }}
docker run --tty -e NETWORK -e ZEBRA_TEST_LIGHTWALLETD=1 -e TEST_LWD_INTEGRATION=1 ${{ vars.GAR_BASE }}/${{ vars.CI_IMAGE_NAME }}@${{ inputs.image_digest }}
# Test that Zebra works using the default config with the latest Zebra version.
test-configuration-file:
Expand Down
10 changes: 5 additions & 5 deletions docker/entrypoint.sh
Original file line number Diff line number Diff line change
Expand Up @@ -59,7 +59,7 @@ fi
: "${RUN_ALL_EXPERIMENTAL_TESTS:=}"
: "${TEST_FAKE_ACTIVATION_HEIGHTS:=}"
: "${TEST_ZEBRA_EMPTY_SYNC:=}"
: "${ZEBRA_TEST_LIGHTWALLETD:=}"
: "${TEST_LWD_INTEGRATION:=}"
: "${FULL_SYNC_MAINNET_TIMEOUT_MINUTES:=}"
: "${FULL_SYNC_TESTNET_TIMEOUT_MINUTES:=}"
: "${TEST_DISK_REBUILD:=}"
Expand Down Expand Up @@ -239,10 +239,6 @@ case "$1" in
# Test that Zebra syncs and checkpoints a few thousand blocks from an empty state.
run_cargo_test "${ENTRYPOINT_FEATURES}" "sync_large_checkpoints_"

elif [[ "${ZEBRA_TEST_LIGHTWALLETD}" -eq "1" ]]; then
# Test launching lightwalletd with an empty lightwalletd and Zebra state.
run_cargo_test "${ENTRYPOINT_FEATURES}" "lightwalletd_integration"

elif [[ -n "${FULL_SYNC_MAINNET_TIMEOUT_MINUTES}" ]]; then
# Run a Zebra full sync test on mainnet.
run_cargo_test "${ENTRYPOINT_FEATURES}" "full_sync_mainnet"
Expand Down Expand Up @@ -303,6 +299,10 @@ case "$1" in
# Since these tests use the same cached state, a state problem in the first test can fail the second test.
run_cargo_test "${ENTRYPOINT_FEATURES}" "--test-threads" "1" "fully_synced_rpc_"

elif [[ "${TEST_LWD_INTEGRATION}" -eq "1" ]]; then
# Test launching lightwalletd with an empty lightwalletd and Zebra state.
run_cargo_test "${ENTRYPOINT_FEATURES}" "lightwalletd_integration"

elif [[ "${TEST_LWD_FULL_SYNC}" -eq "1" ]]; then
# Starting at a cached Zebra tip, run a lightwalletd sync to tip.
check_directory_files "${ZEBRA_CACHED_STATE_DIR}"
Expand Down

0 comments on commit 3983428

Please sign in to comment.