Skip to content

Commit

Permalink
release script + abstraction API status
Browse files Browse the repository at this point in the history
  • Loading branch information
0xtzData committed Feb 11, 2025
1 parent 56a5424 commit ba5e65a
Show file tree
Hide file tree
Showing 3 changed files with 33 additions and 4 deletions.
9 changes: 5 additions & 4 deletions tests/README.md
Original file line number Diff line number Diff line change
@@ -1,7 +1,8 @@
# Verifying Release

To verify a release after installation we follow a simple process:
1. Add release environment URLs to `.envrc`
1. Check current release status `./release.sh --version`
2. Add release environment URLs to `.envrc`
```
BLOCKSCOUT_URLS=(
# URL of environment to verify installed release
Expand All @@ -21,11 +22,11 @@ To verify a release after installation we follow a simple process:
K6_OUT_FILE=json=$your_release_filename.json
REQUEST_TIMEOUT=30000
```
2. Run all the tests using `./release.sh --api --ui --load`
3. Compare performance with the previous release
3. Run all the tests using `./release.sh --api --ui --load`
4. Compare performance with the previous release
```
cd load/tests
BEFORE=release1.json NOW=release2.json node common/compare.js
```
4. Confirm, hotfix or rollback the release
5. Confirm, hotfix or rollback the release
11 changes: 11 additions & 0 deletions tests/e2e/tests/api/api.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -189,4 +189,15 @@ urls.forEach((url: string) => {
expect(withdrawal.amount).toBeDefined()
}
})
test(`@Api ${url} Check account abstraction status`, async ({ request }): Promise<void> => {
const resp = await request.get(`${url}/api/v2/proxy/account-abstraction/status`)
expect(resp.status()).toBe(200)
const body = await resp.json()
expect(body.finished_past_indexing).toBeTruthy()
expect(body.v06).toBeTruthy()
expect(body.v06.enabled).toBeTruthy()
expect(body.v06.live).toBeTruthy()
expect(body.v06.enabled).toBeTruthy()
expect(body.v07.live).toBeTruthy()
})
})
17 changes: 17 additions & 0 deletions tests/release.sh
Original file line number Diff line number Diff line change
Expand Up @@ -4,9 +4,14 @@ source .envrc
run_api=false
run_ui=false
run_load=false
version=false

while [[ $# -gt 0 ]]; do
case "$1" in
--version)
version=true
shift
;;
--api)
run_api=true
shift
Expand Down Expand Up @@ -59,4 +64,16 @@ if $run_load; then
blockscoutv2.js
)
done
fi

if $version; then
for url in "${BLOCKSCOUT_URLS[@]}"; do
response=$(curl -s -L "${url}"/api/v2/config/backend-version)
if [ $? -eq 0 ]; then
backend_version=$(echo "$response" | jq -r '.backend_version')
echo "$url $backend_version"
else
echo "$url Error: Failed to retrieve data"
fi
done
fi

0 comments on commit ba5e65a

Please sign in to comment.