From 16f4c9c3257c5124eca40a8cd54a510b898f0146 Mon Sep 17 00:00:00 2001 From: evgeniy-scherbina Date: Tue, 13 Aug 2024 09:09:24 -0400 Subject: [PATCH] Added check:data test --- .github/scripts/kava-localnet-ci/cli.sh | 18 ++++++++++++++++++ .github/workflows/process_kava_dispatch.yml | 7 ++++++- .../kava-localnet-ci/bootstrap_balances.json | 1 + .../kava-localnet-ci/exempt_accounts.json | 1 + 4 files changed, 26 insertions(+), 1 deletion(-) create mode 100755 .github/scripts/kava-localnet-ci/cli.sh diff --git a/.github/scripts/kava-localnet-ci/cli.sh b/.github/scripts/kava-localnet-ci/cli.sh new file mode 100755 index 0000000..fa14e9e --- /dev/null +++ b/.github/scripts/kava-localnet-ci/cli.sh @@ -0,0 +1,18 @@ +#!/bin/bash + +end_idx=($(curl -s --location --request POST 'http://localhost:8000/network/status' \ +--header 'Content-Type: application/json' \ +--data-raw '{ + "network_identifier": { + "blockchain": "Kava", + "network": "kava-localnet" + } +}' | python3 -c 'import json,sys;obj=json.load(sys.stdin);print(obj["current_block_identifier"]["index"])')) + +latest_X_blocks=10 +start_idx=$(($end_idx - $latest_X_blocks)) + +echo "start check:data" +echo "start_idx: $start_idx" +echo "end_idx : $end_idx" +rosetta-cli --configuration-file rosetta-cli-conf/kava-localnet-ci/config.json check:data --start-block $start_idx --end-block $end_idx diff --git a/.github/workflows/process_kava_dispatch.yml b/.github/workflows/process_kava_dispatch.yml index 76f1ef0..cad7f48 100644 --- a/.github/workflows/process_kava_dispatch.yml +++ b/.github/workflows/process_kava_dispatch.yml @@ -70,7 +70,12 @@ jobs: shell: bash working-directory: ./rosetta-kava - - name: Run Check:construction test + - name: Run check:construction test run: .github/scripts/kava-localnet-ci/construction.sh shell: bash + working-directory: ./rosetta-kava + + - name: Run check:data test + run: .github/scripts/kava-localnet-ci/cli.sh + shell: bash working-directory: ./rosetta-kava \ No newline at end of file diff --git a/rosetta-cli-conf/kava-localnet-ci/bootstrap_balances.json b/rosetta-cli-conf/kava-localnet-ci/bootstrap_balances.json index e69de29..fe51488 100644 --- a/rosetta-cli-conf/kava-localnet-ci/bootstrap_balances.json +++ b/rosetta-cli-conf/kava-localnet-ci/bootstrap_balances.json @@ -0,0 +1 @@ +[] diff --git a/rosetta-cli-conf/kava-localnet-ci/exempt_accounts.json b/rosetta-cli-conf/kava-localnet-ci/exempt_accounts.json index e69de29..fe51488 100644 --- a/rosetta-cli-conf/kava-localnet-ci/exempt_accounts.json +++ b/rosetta-cli-conf/kava-localnet-ci/exempt_accounts.json @@ -0,0 +1 @@ +[]