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: fixes for test after eth 5 to 6 migration #269

Draft
wants to merge 193 commits into
base: main
Choose a base branch
from
Draft
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
193 commits
Select commit Hold shift + click to select a range
fcde284
feat: integration tests setup (#45)
Romsters Oct 10, 2023
ee9545a
Merge branch 'main' into integration-tests
Romsters Oct 10, 2023
8ac53d9
test: add an .env.example file with description to integration-tests
pcheremu Oct 18, 2023
deb9667
test: adding a default action for hardhat
pcheremu Oct 18, 2023
19021be
test: fix path to env
pcheremu Oct 19, 2023
8040412
test: exclude file existence check
pcheremu Oct 19, 2023
3a9d961
test: create a fallback case for a default wallet
pcheremu Oct 19, 2023
6e62c51
test: refactoring
pcheremu Oct 19, 2023
5e62c42
Merge pull request #58 from matter-labs/QA-451-add-envexample-logic
pcheremu Oct 19, 2023
5dc4623
test: restructure test solution
abilevych Oct 24, 2023
1c6074e
test: the tokens API-related suite re-structuring
abilevych Oct 24, 2023
bacb018
test: the address API-related suite re-structuring
abilevych Oct 25, 2023
38723b1
test: the transaction API-related suite re-structuring
abilevych Oct 26, 2023
f18702f
chore: run lint
abilevych Oct 31, 2023
d2ea0e9
test: re-structure test suites for batches, stats, blocks endpoints
abilevych Oct 31, 2023
1730a71
chore: group the SDK-related test suites as pre-requisites
abilevych Nov 1, 2023
ca9e597
chore: hooks / aligning tests suites
abilevych Nov 1, 2023
6ed2427
chore: implemented a global hook for jest
abilevych Nov 3, 2023
cb7a237
chore: local hooks for the addresses endpoint
abilevych Nov 3, 2023
0816c80
chore: local hooks for the tokens endpoint
abilevych Nov 3, 2023
3aa0f34
chore: local hooks for the transaction endpoint
abilevych Nov 3, 2023
e848a0f
chore: add global hooks
abilevych Nov 6, 2023
4064634
chore: fix after lint
abilevych Nov 6, 2023
88cf5b3
chore: changed timeouts in addresses api suite
abilevych Nov 7, 2023
e1ecfa4
chore: optimized addresses/transactions test suites
abilevych Nov 7, 2023
96bce37
test: fix git runner and test issues
pcheremu Nov 8, 2023
cf18598
test: test with a cache
pcheremu Nov 9, 2023
d15df2c
test: test with a node
pcheremu Nov 9, 2023
43ba846
test: test with a cleaned cache in advance
pcheremu Nov 9, 2023
9c990c0
test: test with a node
pcheremu Nov 9, 2023
3b0693e
test: test with a cache
pcheremu Nov 9, 2023
19e5251
test: refactoring
pcheremu Nov 9, 2023
8831d1b
test: refactoring
pcheremu Nov 9, 2023
427d64a
test: remove an issue workaround for husky
pcheremu Nov 9, 2023
37765e0
Merge pull request #83 from matter-labs/QA-522-fix-issues-ci
abilevych Nov 9, 2023
f7ddfe6
Merge pull request #67 from matter-labs/QA-487-re-structure-tests
abilevych Nov 14, 2023
dfbd5d8
test: covering Contract API and Logs API endpoints
amelnytskyi Nov 17, 2023
8b057b1
test: covering Contract API and Logs API endpoints
amelnytskyi Nov 17, 2023
1bc3563
test: covering Contract API and Logs API endpoints
amelnytskyi Nov 21, 2023
21737ce
Merge pull request #92 from matter-labs/QA-535-cover-contract-api
abilevych Nov 21, 2023
3a79075
Merge branch 'main' into QA-540-update-the-integration-test-branch
abilevych Nov 22, 2023
74383a7
chore: update the package-lock.json
abilevych Nov 22, 2023
daf1887
test: fix test for an execution on a CI
abilevych Nov 22, 2023
7fe2e5a
Merge pull request #96 from matter-labs/QA-540-update-the-integration…
abilevych Nov 22, 2023
f9d76f8
feat: integration tests setup (#45)
Romsters Oct 10, 2023
e112da4
test: add an .env.example file with description to integration-tests
pcheremu Oct 18, 2023
7e8ef57
test: adding a default action for hardhat
pcheremu Oct 18, 2023
e58f682
test: fix path to env
pcheremu Oct 19, 2023
e049159
test: exclude file existence check
pcheremu Oct 19, 2023
0646894
test: create a fallback case for a default wallet
pcheremu Oct 19, 2023
b7b433b
test: refactoring
pcheremu Oct 19, 2023
bc671e2
test: restructure test solution
abilevych Oct 24, 2023
7b1e6bc
test: the tokens API-related suite re-structuring
abilevych Oct 24, 2023
88042cf
test: the address API-related suite re-structuring
abilevych Oct 25, 2023
71050d3
test: the transaction API-related suite re-structuring
abilevych Oct 26, 2023
defde5a
chore: run lint
abilevych Oct 31, 2023
3ea13f4
test: re-structure test suites for batches, stats, blocks endpoints
abilevych Oct 31, 2023
44a1d1e
chore: group the SDK-related test suites as pre-requisites
abilevych Nov 1, 2023
de0366e
chore: hooks / aligning tests suites
abilevych Nov 1, 2023
eb3660a
chore: implemented a global hook for jest
abilevych Nov 3, 2023
d71dec4
chore: local hooks for the addresses endpoint
abilevych Nov 3, 2023
fa6c9a6
chore: local hooks for the tokens endpoint
abilevych Nov 3, 2023
5817ed0
chore: local hooks for the transaction endpoint
abilevych Nov 3, 2023
2482504
chore: add global hooks
abilevych Nov 6, 2023
a16183e
chore: fix after lint
abilevych Nov 6, 2023
5f194e3
chore: changed timeouts in addresses api suite
abilevych Nov 7, 2023
0040e2d
chore: optimized addresses/transactions test suites
abilevych Nov 7, 2023
64b9813
test: test with a cache
pcheremu Nov 9, 2023
eabd0b0
test: test with a cleaned cache in advance
pcheremu Nov 9, 2023
b121b73
test: test with a cache
pcheremu Nov 9, 2023
23e8230
test: refactoring
pcheremu Nov 9, 2023
08c70e8
test: remove an issue workaround for husky
pcheremu Nov 9, 2023
fd68f4b
test: covering Contract API and Logs API endpoints
amelnytskyi Nov 17, 2023
359399d
test: covering Contract API and Logs API endpoints
amelnytskyi Nov 17, 2023
ea94965
test: covering Contract API and Logs API endpoints
amelnytskyi Nov 21, 2023
5150799
chore: update the package-lock.json
abilevych Nov 22, 2023
21ea321
Merge branch 'integration-tests' into QA-573-rebase2-be-tests
pcheremu Dec 14, 2023
c3ade7e
Refactoring of app-e2e.yml
pcheremu Dec 14, 2023
ecea709
Small refactoring artifactsSet3.feature
pcheremu Dec 14, 2023
7d93728
Merge pull request #125 from matter-labs/QA-573-rebase2-be-tests
abilevych Dec 15, 2023
e30f4b7
test: prepare run api tests on ci
pcheremu Dec 15, 2023
3355947
test: refactoring
pcheremu Dec 15, 2023
31887d0
test: update name in integration-tests-api.yml
pcheremu Dec 18, 2023
533b4ed
Merge pull request #127 from matter-labs/QA-414-ci-run-on-fixed-branch
abilevych Dec 19, 2023
d0fd386
test: initial commit with tests
pcheremu Jan 5, 2024
c4c1e61
test: eslint refactoring
pcheremu Jan 5, 2024
4b9e9ac
test: updated contract hash for ui test
pcheremu Jan 5, 2024
e0b9368
test: refactoring
pcheremu Jan 5, 2024
9136685
test: refactoring
pcheremu Jan 5, 2024
6255d26
test: fix unstable api test
pcheremu Jan 5, 2024
f9f98a3
test: fix git ignore output folders
pcheremu Jan 5, 2024
3a0f377
test: refactoring
pcheremu Jan 5, 2024
07e50cf
test: refactoring test name
pcheremu Jan 5, 2024
e8d4697
test: refactoring test name
pcheremu Jan 5, 2024
9a51b1f
tests: refactoring test names
pcheremu Jan 10, 2024
1fbd645
test: refactoring eslint
pcheremu Jan 10, 2024
2d90a71
test: refactoring names
pcheremu Jan 10, 2024
05a5367
test: fix api tests
pcheremu Jan 10, 2024
f0fa0f5
test: refactoring
pcheremu Jan 10, 2024
639ff5e
test: refactoring
pcheremu Jan 10, 2024
d26ca9d
test: refactoring
pcheremu Jan 10, 2024
a7cf0d1
test: refactoring after rebase
pcheremu Jan 10, 2024
6ef5983
test: refactoring eslint
pcheremu Jan 10, 2024
43e7a17
test: fix test names add account test to the workflow
pcheremu Jan 11, 2024
3a546fc
test: fix test names add account test to the workflow
pcheremu Jan 11, 2024
5a2e7ba
Merge branch 'QA-446-replacefixupdate2-api-tests' into QA-577-fix-uns…
abilevych Jan 16, 2024
22ec02a
test: fix eslint
pcheremu Jan 16, 2024
6c5a521
test: fix redirection to documentation
pcheremu Jan 16, 2024
50ddbac
test: fix redirection to documentation
pcheremu Jan 16, 2024
792fc08
test: fix links
pcheremu Jan 17, 2024
4a65808
Merge pull request #148 from matter-labs/QA-577-fix-unstable-tests
abilevych Jan 17, 2024
4a8abdd
test: refactoring
pcheremu Jan 17, 2024
8a14d5e
test: fix portal url
pcheremu Jan 17, 2024
3194485
Update packages/integration-tests/tests/api/accounts.test.ts
pcheremu Jan 18, 2024
86baebb
chore: update the Blocks suite name
abilevych Jan 18, 2024
c975ef7
test: fix names in tests
pcheremu Jan 18, 2024
610df0d
test: refactoring
pcheremu Jan 18, 2024
8a57793
Merge pull request #147 from matter-labs/QA-446-replacefixupdate2-api…
abilevych Jan 18, 2024
93dbc2c
chore: api retry logic for tests
abilevych Jan 11, 2024
d09ef6e
fix: lint issues
abilevych Jan 11, 2024
b3f8098
chore: changed timeouts
abilevych Jan 16, 2024
63f77d2
chore: integration api tests refactoring
abilevych Jan 17, 2024
224a338
chore: excluded unstable test
abilevych Jan 17, 2024
276ab27
chore: jest retry option, fix lint
abilevych Jan 17, 2024
6ef6d44
chore: refactoring test actualization after rebase
abilevych Jan 18, 2024
3f21529
fix: lint issue
abilevych Jan 18, 2024
ee53339
chore: exclude gating test
abilevych Jan 18, 2024
806dddb
chore: excluded unstable tests
abilevych Jan 18, 2024
c4bdcae
chore: updated retry-logic for integration api tests
abilevych Jan 23, 2024
8d374d5
fix: integration api tests for the CI run
abilevych Jan 23, 2024
c6159a3
chore: refactoring leftovers in the test solution
abilevych Jan 23, 2024
54005cf
chore: optimized integration API tests
abilevych Jan 23, 2024
c411d58
chore: refactored jest config
abilevych Jan 23, 2024
d23bd9b
chore: refactoring test retry method
abilevych Jan 24, 2024
eb0e8b6
Merge pull request #149 from matter-labs/QA-582-retry-wrapper-over-AP…
abilevych Jan 24, 2024
2a4f726
test: covering tokens API endpoints tc1803 (#155)
amelnytskyi Jan 30, 2024
91641ee
test: fix readme docker command (#158)
pcheremu Jan 30, 2024
a57a9ce
test: covering Batches API and partially covered Transactions (#156)
amelnytskyi Jan 30, 2024
c9482df
feat: new automation tests for accounts API (#163)
olehbairak Feb 6, 2024
d8daa3d
test: fixing gating transactions tests (#162)
amelnytskyi Feb 7, 2024
5708ef8
test: rebase integration tests to main (#167)
pcheremu Feb 12, 2024
a42afca
test: resolve conflicts
pcheremu Feb 13, 2024
36380a0
test: fix a new line typos
pcheremu Feb 13, 2024
ae4a4d4
test: remove a version from docker compose
pcheremu Feb 13, 2024
d186114
test: roll back the version to the docker compose file
pcheremu Feb 13, 2024
946b0f6
fix: remove docker version (#169)
vasyl-ivanchuk Feb 14, 2024
c578193
Merge branch 'integration-tests'
pcheremu Jul 8, 2024
32b7668
test: debug step - revert these changes
pcheremu Jul 9, 2024
bc0a23e
test: debug step 2 - revert these changes
pcheremu Jul 9, 2024
3c4c5fc
test: debug 0 balance on L1
pcheremu Jul 10, 2024
6ad6b15
test: fix before ether upgrade
pcheremu Jul 15, 2024
139cb94
test: fixes part one
pcheremu Jul 24, 2024
f5efa04
test: second part of fixes
pcheremu Jul 25, 2024
2b408d9
test: first test run
pcheremu Jul 25, 2024
219cf06
test: refactoring
pcheremu Jul 25, 2024
4d29608
test: refactoring
pcheremu Jul 25, 2024
0e330c6
test: refactoring
pcheremu Jul 25, 2024
ab5d210
test: fix nonce for mintNFT
pcheremu Jul 31, 2024
24e955e
test: test with and without a timeout
pcheremu Jul 31, 2024
522e332
test: debug timeout issue
pcheremu Jul 31, 2024
6388b11
test: debug helper issue
pcheremu Jul 31, 2024
4faa3a7
test: refactoring
pcheremu Jul 31, 2024
e0c1204
test: fix timeout
pcheremu Aug 2, 2024
57646e4
test: refactoring
pcheremu Aug 2, 2024
60fdd06
test: docker compose update the command
pcheremu Aug 2, 2024
04872d8
test: unset timeout
pcheremu Aug 2, 2024
794b24c
test: refactoring
pcheremu Aug 2, 2024
21d8a6f
test: fake qwe test and commented glogal.ts
pcheremu Aug 2, 2024
1299c30
test: test compilation
pcheremu Aug 2, 2024
d851389
test: replace contracts
pcheremu Aug 2, 2024
2780b4a
test: basic run
pcheremu Aug 13, 2024
a42624f
test: adding L2 contract
pcheremu Aug 13, 2024
6bac4a3
test: data fetcher cfg change timeout
pcheremu Aug 14, 2024
f386b77
test: new read method
pcheremu Aug 14, 2024
036fcb4
test: change execute method
pcheremu Aug 14, 2024
12aac45
test: return global config back
pcheremu Aug 14, 2024
7ad9b5c
test: refactoring scripts to default settings
pcheremu Aug 14, 2024
8cbddb6
test: return accounts.test.ts
pcheremu Aug 19, 2024
99422f6
test: return addresses
pcheremu Aug 19, 2024
d66f09a
test: return other tests
pcheremu Aug 19, 2024
551be06
test: fix logs test
pcheremu Aug 19, 2024
4c7dc7e
test: split transactions
pcheremu Aug 19, 2024
9fbdcf5
test: return transactions
pcheremu Aug 19, 2024
70205f7
test: tx fix
pcheremu Aug 19, 2024
ae5ddef
test: fix tx all
pcheremu Aug 19, 2024
2b02e48
test: return e2e tests
pcheremu Aug 20, 2024
2c292b8
test: fix e2e
pcheremu Aug 20, 2024
2111a94
test: refactoring return lic check
pcheremu Aug 20, 2024
82002ee
test: refactoring paymaster
pcheremu Aug 20, 2024
ccea0dc
test: node 20 by default and WTFPL lic added
pcheremu Aug 20, 2024
d536292
test: added several new lic
pcheremu Aug 20, 2024
0c71d0d
test: return node back
pcheremu Aug 20, 2024
a49b121
Merge branch 'main' into integration-tests-ether-migration
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
4 changes: 2 additions & 2 deletions .github/workflows/api-e2e.yml
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,7 @@ jobs:
- 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