feat(ci): add `fully_synced_rpc_test` test to CI (#4223)

* feat(ci): add lightwalletd RPC call test

Co-authored-by: teor <teor@riseup.net>
This commit is contained in:
Gustavo Valverde 2022-05-05 05:27:07 -04:00 committed by GitHub
parent d720ab011a
commit a23420be88
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
4 changed files with 19 additions and 16 deletions

View File

@ -33,7 +33,6 @@ on:
needs_zebra_state:
required: true
type: boolean
default: false
saves_to_disk:
required: true
type: boolean

View File

@ -215,3 +215,17 @@ jobs:
saves_to_disk: true
disk_suffix: tip
height_grep_text: 'finished initial sync to chain tip, using gossiped blocks sync_percent=100.* current_height=Height'
lightwalletd-rpc-test:
if: ${{ github.event.inputs.regenerate-disks != 'true' }}
needs: build
uses: ./.github/workflows/gcp-test-deploy.yml
with:
app_name: lightwalletd
test_id: fully-synced-rpc
test_description: Test lightwalletd RPC with a Zebra tip state
test_variables: '-e TEST_LWD_RPC_CALL=1 -e ZEBRA_TEST_LIGHTWALLETD=1 -e ZEBRA_FORCE_USE_COLOR=1 -e ZEBRA_CACHED_STATE_DIR=/var/cache/zebrad-cache'
needs_zebra_state: true
saves_to_disk: false
disk_suffix: tip
zebra_state_path: '/var/cache'

View File

@ -57,6 +57,9 @@ ENV RUST_LIB_BACKTRACE ${RUST_LIB_BACKTRACE:-0}
ARG COLORBT_SHOW_HIDDEN
ENV COLORBT_SHOW_HIDDEN ${COLORBT_SHOW_HIDDEN:-0}
ARG RUST_LOG
ENV RUST_LOG ${RUST_LOG:-info}
# Skip IPv6 tests by default, as some CI environment don't have IPv6 available
ARG ZEBRA_SKIP_IPV6_TESTS
ENV ZEBRA_SKIP_IPV6_TESTS ${ZEBRA_SKIP_IPV6_TESTS:-1}

View File

@ -2,21 +2,6 @@
set -x
if [ ! -f /app/zebrad.toml ]; then
echo "
[consensus]
checkpoint_sync = ${CHECKPOINT_SYNC}
[metrics]
endpoint_addr = 0.0.0.0:9999
[network]
network = ${NETWORK}
[state]
cache_dir = /zebrad-cache
[tracing]
force_use_color = true
endpoint_addr = 0.0.0.0:3000" > /app/zebrad.toml
fi
case "$1" in
-- | cargo)
if [[ "$RUN_ALL_TESTS" -eq "1" ]]; then
@ -27,6 +12,8 @@ case "$1" in
exec cargo "test" "--locked" "--release" "--features" "enable-sentry,test_sync_to_mandatory_checkpoint_${NETWORK,,}" "--manifest-path" "zebrad/Cargo.toml" "sync_to_mandatory_checkpoint_${NETWORK,,}"
elif [[ "$TEST_CHECKPOINT_SYNC" -eq "1" ]]; then
exec cargo "test" "--locked" "--release" "--features" "enable-sentry,test_sync_past_mandatory_checkpoint_${NETWORK,,}" "--manifest-path" "zebrad/Cargo.toml" "sync_past_mandatory_checkpoint_${NETWORK,,}"
elif [[ "$TEST_LWD_RPC_CALL" -eq "1" ]]; then
exec cargo "test" "--locked" "--release" "--features" "enable-sentry" "--test" "acceptance" "--" "--nocapture" "--ignored" "fully_synced_rpc_test"
else
exec "$@"
fi