Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

test: integration test eth6 signed #280

Merged
merged 177 commits into from
Aug 23, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
177 commits
Select commit Hold shift + click to select a range
dc2b9f6
feat: integration tests setup (#45)
Romsters Oct 10, 2023
748e6b7
test: add an .env.example file with description to integration-tests
pcheremu Oct 18, 2023
11de610
test: adding a default action for hardhat
pcheremu Oct 18, 2023
c8a9f8c
test: fix path to env
pcheremu Oct 19, 2023
4084487
test: exclude file existence check
pcheremu Oct 19, 2023
268d43f
test: create a fallback case for a default wallet
pcheremu Oct 19, 2023
3828768
test: refactoring
pcheremu Oct 19, 2023
432d39c
test: restructure test solution
abilevych Oct 24, 2023
2af4f4d
test: the tokens API-related suite re-structuring
abilevych Oct 24, 2023
5baa240
test: the address API-related suite re-structuring
abilevych Oct 25, 2023
2edfa18
test: the transaction API-related suite re-structuring
abilevych Oct 26, 2023
60e17a7
chore: run lint
abilevych Oct 31, 2023
1f00c4e
test: re-structure test suites for batches, stats, blocks endpoints
abilevych Oct 31, 2023
7118554
chore: group the SDK-related test suites as pre-requisites
abilevych Nov 1, 2023
5de3b57
chore: hooks / aligning tests suites
abilevych Nov 1, 2023
5db09a2
chore: implemented a global hook for jest
abilevych Nov 3, 2023
8868799
chore: local hooks for the addresses endpoint
abilevych Nov 3, 2023
dc3d6d7
chore: local hooks for the tokens endpoint
abilevych Nov 3, 2023
ba402fc
chore: local hooks for the transaction endpoint
abilevych Nov 3, 2023
ff39286
chore: add global hooks
abilevych Nov 6, 2023
d71ff4e
chore: fix after lint
abilevych Nov 6, 2023
a35a371
chore: changed timeouts in addresses api suite
abilevych Nov 7, 2023
64124bd
chore: optimized addresses/transactions test suites
abilevych Nov 7, 2023
6ac3a0b
test: test with a cache
pcheremu Nov 9, 2023
8ee6421
test: test with a cleaned cache in advance
pcheremu Nov 9, 2023
4559347
test: test with a cache
pcheremu Nov 9, 2023
03eb41c
test: refactoring
pcheremu Nov 9, 2023
0aa5d2b
test: remove an issue workaround for husky
pcheremu Nov 9, 2023
8f2d61e
test: covering Contract API and Logs API endpoints
amelnytskyi Nov 17, 2023
99af5ac
test: covering Contract API and Logs API endpoints
amelnytskyi Nov 17, 2023
42b1980
test: covering Contract API and Logs API endpoints
amelnytskyi Nov 21, 2023
b243058
chore: update the package-lock.json
abilevych Nov 22, 2023
5fe1ce2
feat: integration tests setup (#45)
Romsters Oct 10, 2023
1725680
test: add an .env.example file with description to integration-tests
pcheremu Oct 18, 2023
57dc056
test: adding a default action for hardhat
pcheremu Oct 18, 2023
79f28b7
test: fix path to env
pcheremu Oct 19, 2023
cfb01e4
test: exclude file existence check
pcheremu Oct 19, 2023
5f06f90
test: create a fallback case for a default wallet
pcheremu Oct 19, 2023
64ac70e
test: refactoring
pcheremu Oct 19, 2023
ecbd7c2
test: restructure test solution
abilevych Oct 24, 2023
46029f8
test: the tokens API-related suite re-structuring
abilevych Oct 24, 2023
0876b5a
test: the address API-related suite re-structuring
abilevych Oct 25, 2023
ebf68ee
test: the transaction API-related suite re-structuring
abilevych Oct 26, 2023
e47a36d
chore: run lint
abilevych Oct 31, 2023
27aa92f
test: re-structure test suites for batches, stats, blocks endpoints
abilevych Oct 31, 2023
a55907e
chore: group the SDK-related test suites as pre-requisites
abilevych Nov 1, 2023
0ec33f4
chore: hooks / aligning tests suites
abilevych Nov 1, 2023
61bb3bb
chore: implemented a global hook for jest
abilevych Nov 3, 2023
38900f6
chore: local hooks for the addresses endpoint
abilevych Nov 3, 2023
114af9a
chore: local hooks for the tokens endpoint
abilevych Nov 3, 2023
b406922
chore: local hooks for the transaction endpoint
abilevych Nov 3, 2023
4987f01
chore: add global hooks
abilevych Nov 6, 2023
dd48776
chore: fix after lint
abilevych Nov 6, 2023
7d87903
chore: changed timeouts in addresses api suite
abilevych Nov 7, 2023
cbf2660
chore: optimized addresses/transactions test suites
abilevych Nov 7, 2023
87d9993
test: fix git runner and test issues
pcheremu Nov 8, 2023
eff7f69
test: test with a cache
pcheremu Nov 9, 2023
63ef9f0
test: test with a node
pcheremu Nov 9, 2023
584471c
test: test with a cleaned cache in advance
pcheremu Nov 9, 2023
501ff7f
test: test with a node
pcheremu Nov 9, 2023
a611e2c
test: test with a cache
pcheremu Nov 9, 2023
efbb43e
test: refactoring
pcheremu Nov 9, 2023
2e1eb1d
test: refactoring
pcheremu Nov 9, 2023
1e2b442
test: remove an issue workaround for husky
pcheremu Nov 9, 2023
f9e13a6
test: covering Contract API and Logs API endpoints
amelnytskyi Nov 17, 2023
bcb0598
test: covering Contract API and Logs API endpoints
amelnytskyi Nov 17, 2023
3fd1e62
test: covering Contract API and Logs API endpoints
amelnytskyi Nov 21, 2023
44f7d72
chore: update the package-lock.json
abilevych Nov 22, 2023
4c7aca0
test: fix test for an execution on a CI
abilevych Nov 22, 2023
be56eb2
Refactoring of app-e2e.yml
pcheremu Dec 14, 2023
646fb83
Small refactoring artifactsSet3.feature
pcheremu Dec 14, 2023
aede350
test: prepare run api tests on ci
pcheremu Dec 15, 2023
486e339
test: refactoring
pcheremu Dec 15, 2023
a78fee3
test: update name in integration-tests-api.yml
pcheremu Dec 18, 2023
ac1c265
test: initial commit with tests
pcheremu Jan 5, 2024
fe1d490
test: eslint refactoring
pcheremu Jan 5, 2024
71c3b1e
test: updated contract hash for ui test
pcheremu Jan 5, 2024
dacd1bb
test: refactoring
pcheremu Jan 5, 2024
4f810a6
test: refactoring
pcheremu Jan 5, 2024
e7e8aab
test: fix unstable api test
pcheremu Jan 5, 2024
7b814ca
test: fix git ignore output folders
pcheremu Jan 5, 2024
4a3342d
test: refactoring
pcheremu Jan 5, 2024
84312a6
test: refactoring test name
pcheremu Jan 5, 2024
205d5e8
test: refactoring test name
pcheremu Jan 5, 2024
3f3b98c
tests: refactoring test names
pcheremu Jan 10, 2024
95039d4
test: refactoring eslint
pcheremu Jan 10, 2024
5cdebf5
test: refactoring names
pcheremu Jan 10, 2024
3fb5daf
test: fix api tests
pcheremu Jan 10, 2024
ebc1803
test: refactoring
pcheremu Jan 10, 2024
312c358
test: refactoring
pcheremu Jan 10, 2024
0c5cd05
test: refactoring
pcheremu Jan 10, 2024
78a61ba
test: refactoring after rebase
pcheremu Jan 10, 2024
b1f01cd
test: refactoring eslint
pcheremu Jan 10, 2024
da4dc7f
test: fix test names add account test to the workflow
pcheremu Jan 11, 2024
a629a0f
test: fix test names add account test to the workflow
pcheremu Jan 11, 2024
a009a50
test: fix eslint
pcheremu Jan 16, 2024
8e22a98
test: fix redirection to documentation
pcheremu Jan 16, 2024
664f8ab
test: fix redirection to documentation
pcheremu Jan 16, 2024
203cb18
test: fix links
pcheremu Jan 17, 2024
731e404
test: refactoring
pcheremu Jan 17, 2024
c9f1a8a
test: fix portal url
pcheremu Jan 17, 2024
5fb4b05
Update packages/integration-tests/tests/api/accounts.test.ts
pcheremu Jan 18, 2024
2d95e5e
chore: update the Blocks suite name
abilevych Jan 18, 2024
6172a4d
test: fix names in tests
pcheremu Jan 18, 2024
0f2c847
test: refactoring
pcheremu Jan 18, 2024
ce47834
chore: api retry logic for tests
abilevych Jan 11, 2024
bb0efc6
fix: lint issues
abilevych Jan 11, 2024
54edba5
chore: changed timeouts
abilevych Jan 16, 2024
6200713
chore: integration api tests refactoring
abilevych Jan 17, 2024
dbc090a
chore: excluded unstable test
abilevych Jan 17, 2024
452d4b7
chore: jest retry option, fix lint
abilevych Jan 17, 2024
a0ce689
chore: refactoring test actualization after rebase
abilevych Jan 18, 2024
0f7fb10
fix: lint issue
abilevych Jan 18, 2024
7efc2f9
chore: exclude gating test
abilevych Jan 18, 2024
5396cb3
chore: excluded unstable tests
abilevych Jan 18, 2024
4be21a7
chore: updated retry-logic for integration api tests
abilevych Jan 23, 2024
745b398
fix: integration api tests for the CI run
abilevych Jan 23, 2024
22348f5
chore: refactoring leftovers in the test solution
abilevych Jan 23, 2024
4ac8085
chore: optimized integration API tests
abilevych Jan 23, 2024
ae69ee1
chore: refactored jest config
abilevych Jan 23, 2024
f777c35
chore: refactoring test retry method
abilevych Jan 24, 2024
210da36
test: covering tokens API endpoints tc1803 (#155)
amelnytskyi Jan 30, 2024
7158934
test: fix readme docker command (#158)
pcheremu Jan 30, 2024
be61cc8
test: covering Batches API and partially covered Transactions (#156)
amelnytskyi Jan 30, 2024
abad149
feat: new automation tests for accounts API (#163)
olehbairak Feb 6, 2024
6030f2b
test: fixing gating transactions tests (#162)
amelnytskyi Feb 7, 2024
2a6976b
test: rebase integration tests to main (#167)
pcheremu Feb 12, 2024
6ac436d
test: fix a new line typos
pcheremu Feb 13, 2024
86ac694
test: remove a version from docker compose
pcheremu Feb 13, 2024
9894fc4
test: roll back the version to the docker compose file
pcheremu Feb 13, 2024
6d4ebfc
fix: remove docker version (#169)
vasyl-ivanchuk Feb 14, 2024
141e610
test: debug step - revert these changes
pcheremu Jul 9, 2024
38d9c10
test: debug step 2 - revert these changes
pcheremu Jul 9, 2024
aa60039
test: debug 0 balance on L1
pcheremu Jul 10, 2024
cabdaeb
test: fix before ether upgrade
pcheremu Jul 15, 2024
be540ee
test: fixes part one
pcheremu Jul 24, 2024
626729a
test: second part of fixes
pcheremu Jul 25, 2024
5931542
test: first test run
pcheremu Jul 25, 2024
504c46a
test: refactoring
pcheremu Jul 25, 2024
f8a3e62
test: refactoring
pcheremu Jul 25, 2024
1b021e6
test: refactoring
pcheremu Jul 25, 2024
2931f14
test: fix nonce for mintNFT
pcheremu Jul 31, 2024
62b8d79
test: test with and without a timeout
pcheremu Jul 31, 2024
36eb885
test: debug timeout issue
pcheremu Jul 31, 2024
f038635
test: debug helper issue
pcheremu Jul 31, 2024
c69554f
test: refactoring
pcheremu Jul 31, 2024
844f1ab
test: fix timeout
pcheremu Aug 2, 2024
15fafd4
test: refactoring
pcheremu Aug 2, 2024
caa6bdc
test: docker compose update the command
pcheremu Aug 2, 2024
22b77e4
test: unset timeout
pcheremu Aug 2, 2024
4ad255c
test: refactoring
pcheremu Aug 2, 2024
e5eb642
test: fake qwe test and commented glogal.ts
pcheremu Aug 2, 2024
24ec1cc
test: test compilation
pcheremu Aug 2, 2024
e636d57
test: replace contracts
pcheremu Aug 2, 2024
a4d5287
test: basic run
pcheremu Aug 13, 2024
215eae4
test: adding L2 contract
pcheremu Aug 13, 2024
9c34c3e
test: data fetcher cfg change timeout
pcheremu Aug 14, 2024
bae20f2
test: new read method
pcheremu Aug 14, 2024
ba067d2
test: change execute method
pcheremu Aug 14, 2024
11e7b21
test: return global config back
pcheremu Aug 14, 2024
31a3c2e
test: refactoring scripts to default settings
pcheremu Aug 14, 2024
58e5208
test: return accounts.test.ts
pcheremu Aug 19, 2024
0507302
test: return addresses
pcheremu Aug 19, 2024
abea0b3
test: return other tests
pcheremu Aug 19, 2024
a0ec055
test: fix logs test
pcheremu Aug 19, 2024
5abae97
test: split transactions
pcheremu Aug 19, 2024
40b6d62
test: return transactions
pcheremu Aug 19, 2024
2af830a
test: tx fix
pcheremu Aug 19, 2024
34a988d
test: fix tx all
pcheremu Aug 19, 2024
7167303
test: return e2e tests
pcheremu Aug 20, 2024
b9c811d
test: fix e2e
pcheremu Aug 20, 2024
b71cd0b
test: refactoring return lic check
pcheremu Aug 20, 2024
de95f4c
test: refactoring paymaster
pcheremu Aug 20, 2024
bd0a1f2
test: node 20 by default and WTFPL lic added
pcheremu Aug 20, 2024
f70c9d7
test: added several new lic
pcheremu Aug 20, 2024
9cf7015
test: return node back
pcheremu Aug 20, 2024
40da208
test: fix rebase re-sign
pcheremu Aug 23, 2024
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion .dockerignore
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
**/dist/
**.env
**.env
6 changes: 3 additions & 3 deletions .github/workflows/api-e2e.yml
Original file line number Diff line number Diff line change
Expand Up @@ -29,12 +29,12 @@ jobs:

- name: Start docker containers
run: |
docker-compose -f "docker-compose.e2e.yaml" up -d --build
docker compose -f "docker-compose.e2e.yaml" up -d --build

- name: Setup Node.js
uses: actions/setup-node@v3
with:
node-version: '18'
node-version: '20'
cache: 'npm'

- name: Install dependencies
Expand All @@ -56,4 +56,4 @@ jobs:

- name: Stop containers
if: always()
run: docker-compose -f "docker-compose.e2e.yaml" down
run: docker compose -f "docker-compose.e2e.yaml" down
22 changes: 10 additions & 12 deletions .github/workflows/app-e2e.yml
Original file line number Diff line number Diff line change
Expand Up @@ -47,16 +47,16 @@ jobs:
fail-fast: false
matrix:
tags: [
"@artifactsSet1",
"@artifactsSet2",
"@artifactsSet3",
"@artifactsSet4",
"@redirectionSet1",
"@redirectionSet2",
"@redirectionSet3",
"@copying",
"@search",
"@testnetSmokeSuite"
"@artifactsSet1",
"@artifactsSet2",
"@artifactsSet3",
"@artifactsSet4",
"@redirectionSet1",
"@redirectionSet2",
"@redirectionSet3",
"@copying",
"@search",
"@testnetSmokeSuite"
]

name: '${{ matrix.tags }}'
Expand All @@ -79,8 +79,6 @@ jobs:
uses: actions/cache@v3
env:
cache-name: cache-node-modules
# Workaround for bug https://github.com/typicode/husky/issues/991
HUSKY: 0
with:
path: node_modules
key: ${{ runner.os }}-build-${{ env.cache-name }}-${{ hashFiles('**/package-lock.json') }}
Expand Down
62 changes: 62 additions & 0 deletions .github/workflows/integration-tests-api.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,62 @@
name: Integration test - API
on: pull_request

jobs:
runTests:
timeout-minutes: 30
runs-on: ubuntu-latest
permissions:
contents: read
pull-requests: write
checks: write
strategy:
matrix:
node-version: ['lts/*'] # 18.17.1 or lts/*
test-pattern:
- stub.test.ts
- accounts.test.ts
- addresses.test.ts
- batches.test.ts
- blocks.test.ts
- contracts.test.ts
- logs.test.ts
- stats.test.ts
- tokens.test.ts
- transactions.test.ts
name: 'API test set: ${{ matrix.test-pattern}} / Node: ${{ matrix.node-version}}'
steps:
- name: Checkout with Submodule
uses: actions/checkout@v3
with:
fetch-depth: 0

- name: Setup Node.js
uses: actions/setup-node@v3
with:
node-version: ${{ matrix.node-version }}
cache: npm

- name: Install dependencies
run: |
npm ci --no-audit
npx playwright install --with-deps chromium
- name: Log in to Docker Hub
uses: docker/login-action@v2
with:
username: ${{ secrets.DOCKERHUB_USER }}
password: ${{ secrets.DOCKERHUB_TOKEN }}

- name: Start docker containers
run: |
docker compose -f "docker-compose.yaml" up -d --build
- name: List running containers
run: docker ps

- name: API tests run (parallel)
run: |
cd packages/integration-tests
npx jest --verbose --testPathPattern=${{ matrix.test-pattern }}
- name: Stop containers
if: always()
run: |
docker compose -f "docker-compose.yaml" down
5 changes: 5 additions & 0 deletions .github/workflows/nodejs-license.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -6,12 +6,14 @@ env:
ALLOWED_LICENSES: >
MIT;
0BSD;
BSD;
BSD-2-Clause;
BSD-3-Clause;
ISC;
Apache-2.0;
Apache 2.0;
MPL-2.0;
LGPL-3.0;
CC0-1.0;
CC-BY-3.0;
CC-BY-4.0;
Expand All @@ -21,6 +23,9 @@ env:
Unlicense;
UNLICENSED;
BlueOak-1.0.0;
WTFPL;
PSF;
Custom: https://github.com/dominictarr/event-stream;
# [email protected] - BSD-3-Clause
# [email protected] - BSD-2-Clause
# [email protected] - MIT
Expand Down
8 changes: 8 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,13 @@ cypress/videos/
cypress/screenshots/
tests/e2e/reports/
**/tests/e2e/artifacts/
**/playbook/deployments-zk/
**/playbook/typechain-types/
**/playbook/artifacts-zk/
**/playbook/artifacts/
**/playbook/buffer/
**/playbook/cache-zk/
**/playbook/cache/

# Logs
logs
Expand Down Expand Up @@ -46,6 +53,7 @@ lerna-debug.log*
*.njsproj
*.sln
*.sw?
*.vscode

# IDE - VSCode
.vscode/*
Expand Down
5 changes: 3 additions & 2 deletions .vscode/settings.json
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
{
"typescript.tsdk": "node_modules/typescript/lib"
}
"typescript.tsdk": "node_modules/typescript/lib",
"editor.tabSize": 2
}
2 changes: 2 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,8 @@ This repository is a monorepo consisting of 4 packages:
- [API](./packages/api) - a service providing Web API for retrieving structured [zkSync Era](https://zksync.io) blockchain data collected by [Worker](./packages/worker). It connects to the Worker's database to be able to query the collected data.
- [App](./packages/app) - a front-end app providing an easy-to-use interface for users to view and inspect transactions, blocks, contracts and more. It makes requests to the [API](./packages/api) to get the data and presents it in a way that's easy to read and understand.

Also the repository contains [integration-test](./packages/integration-tests) package with a set of API and UI tests. Follow this [Readme](./packages/integration-tests/README.md) for more details.

## 🏛 Architecture
The following diagram illustrates how are the block explorer components connected:

Expand Down
2 changes: 1 addition & 1 deletion docker-compose.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -125,4 +125,4 @@ volumes:
reth:
postgres:
zksync-config:
zksync-data:
zksync-data:
Loading
Loading