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 tests ether migration signed #278

Closed
wants to merge 176 commits into from
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
176 commits
Select commit Hold shift + click to select a range
5aa0443
feat: integration tests setup (#45)
Romsters Oct 10, 2023
5f9dda7
test: add an .env.example file with description to integration-tests
pcheremu Oct 18, 2023
8f07bce
test: adding a default action for hardhat
pcheremu Oct 18, 2023
60b9d79
test: fix path to env
pcheremu Oct 19, 2023
9ecf422
test: exclude file existence check
pcheremu Oct 19, 2023
ee63138
test: create a fallback case for a default wallet
pcheremu Oct 19, 2023
f01e189
test: refactoring
pcheremu Oct 19, 2023
a8d29f5
test: restructure test solution
abilevych Oct 24, 2023
dbec397
test: the tokens API-related suite re-structuring
abilevych Oct 24, 2023
3c8c3d7
test: the address API-related suite re-structuring
abilevych Oct 25, 2023
3682fa5
test: the transaction API-related suite re-structuring
abilevych Oct 26, 2023
2e41cb2
chore: run lint
abilevych Oct 31, 2023
b8e4db3
test: re-structure test suites for batches, stats, blocks endpoints
abilevych Oct 31, 2023
b55ba8f
chore: group the SDK-related test suites as pre-requisites
abilevych Nov 1, 2023
7c17b3f
chore: hooks / aligning tests suites
abilevych Nov 1, 2023
cb26bae
chore: implemented a global hook for jest
abilevych Nov 3, 2023
59b5f68
chore: local hooks for the addresses endpoint
abilevych Nov 3, 2023
c19732a
chore: local hooks for the tokens endpoint
abilevych Nov 3, 2023
f1a0ffc
chore: local hooks for the transaction endpoint
abilevych Nov 3, 2023
39916e8
chore: add global hooks
abilevych Nov 6, 2023
2ed080a
chore: fix after lint
abilevych Nov 6, 2023
422d2e6
chore: changed timeouts in addresses api suite
abilevych Nov 7, 2023
23150fb
chore: optimized addresses/transactions test suites
abilevych Nov 7, 2023
3a1dbc1
test: test with a cache
pcheremu Nov 9, 2023
6edd281
test: test with a cleaned cache in advance
pcheremu Nov 9, 2023
0dfb3b0
test: test with a cache
pcheremu Nov 9, 2023
ede46ea
test: refactoring
pcheremu Nov 9, 2023
8da9759
test: remove an issue workaround for husky
pcheremu Nov 9, 2023
f18e975
test: covering Contract API and Logs API endpoints
amelnytskyi Nov 17, 2023
a24a0a3
test: covering Contract API and Logs API endpoints
amelnytskyi Nov 17, 2023
a3d5040
test: covering Contract API and Logs API endpoints
amelnytskyi Nov 21, 2023
0633916
chore: update the package-lock.json
abilevych Nov 22, 2023
b2a1cc4
feat: integration tests setup (#45)
Romsters Oct 10, 2023
edb70be
test: add an .env.example file with description to integration-tests
pcheremu Oct 18, 2023
a97334f
test: adding a default action for hardhat
pcheremu Oct 18, 2023
8169a38
test: fix path to env
pcheremu Oct 19, 2023
ba9671f
test: exclude file existence check
pcheremu Oct 19, 2023
fae57cc
test: create a fallback case for a default wallet
pcheremu Oct 19, 2023
4ffd470
test: refactoring
pcheremu Oct 19, 2023
3d75004
test: restructure test solution
abilevych Oct 24, 2023
3e05b59
test: the tokens API-related suite re-structuring
abilevych Oct 24, 2023
e6396ea
test: the address API-related suite re-structuring
abilevych Oct 25, 2023
be33c19
test: the transaction API-related suite re-structuring
abilevych Oct 26, 2023
d9e21a9
chore: run lint
abilevych Oct 31, 2023
586d601
test: re-structure test suites for batches, stats, blocks endpoints
abilevych Oct 31, 2023
6cddb3c
chore: group the SDK-related test suites as pre-requisites
abilevych Nov 1, 2023
c1bcf3b
chore: hooks / aligning tests suites
abilevych Nov 1, 2023
5df8a06
chore: implemented a global hook for jest
abilevych Nov 3, 2023
c48d8e5
chore: local hooks for the addresses endpoint
abilevych Nov 3, 2023
a02e811
chore: local hooks for the tokens endpoint
abilevych Nov 3, 2023
6c856dd
chore: local hooks for the transaction endpoint
abilevych Nov 3, 2023
e9375db
chore: add global hooks
abilevych Nov 6, 2023
e426e67
chore: fix after lint
abilevych Nov 6, 2023
c89dd06
chore: changed timeouts in addresses api suite
abilevych Nov 7, 2023
15e3a82
chore: optimized addresses/transactions test suites
abilevych Nov 7, 2023
d66b772
test: fix git runner and test issues
pcheremu Nov 8, 2023
8103ed4
test: test with a cache
pcheremu Nov 9, 2023
8418b20
test: test with a node
pcheremu Nov 9, 2023
26f9821
test: test with a cleaned cache in advance
pcheremu Nov 9, 2023
2d3fcc2
test: test with a node
pcheremu Nov 9, 2023
4b39b96
test: test with a cache
pcheremu Nov 9, 2023
46bd79b
test: refactoring
pcheremu Nov 9, 2023
61b5348
test: refactoring
pcheremu Nov 9, 2023
ee2fc17
test: remove an issue workaround for husky
pcheremu Nov 9, 2023
978e520
test: covering Contract API and Logs API endpoints
amelnytskyi Nov 17, 2023
88d810f
test: covering Contract API and Logs API endpoints
amelnytskyi Nov 17, 2023
f137880
test: covering Contract API and Logs API endpoints
amelnytskyi Nov 21, 2023
a6610d4
chore: update the package-lock.json
abilevych Nov 22, 2023
8018e9d
test: fix test for an execution on a CI
abilevych Nov 22, 2023
0a2bcfc
Refactoring of app-e2e.yml
pcheremu Dec 14, 2023
e1ffadb
Small refactoring artifactsSet3.feature
pcheremu Dec 14, 2023
a5a4ba8
test: prepare run api tests on ci
pcheremu Dec 15, 2023
b20342a
test: refactoring
pcheremu Dec 15, 2023
f35e0b1
test: update name in integration-tests-api.yml
pcheremu Dec 18, 2023
694bebf
test: initial commit with tests
pcheremu Jan 5, 2024
8916eb2
test: eslint refactoring
pcheremu Jan 5, 2024
fc3f177
test: updated contract hash for ui test
pcheremu Jan 5, 2024
ed2fc85
test: refactoring
pcheremu Jan 5, 2024
f8e5033
test: refactoring
pcheremu Jan 5, 2024
6f8947b
test: fix unstable api test
pcheremu Jan 5, 2024
6f547aa
test: fix git ignore output folders
pcheremu Jan 5, 2024
8df1aa4
test: refactoring
pcheremu Jan 5, 2024
54c415d
test: refactoring test name
pcheremu Jan 5, 2024
0d7435e
test: refactoring test name
pcheremu Jan 5, 2024
b2f7a20
tests: refactoring test names
pcheremu Jan 10, 2024
85b5485
test: refactoring eslint
pcheremu Jan 10, 2024
6375904
test: refactoring names
pcheremu Jan 10, 2024
a6d104a
test: fix api tests
pcheremu Jan 10, 2024
275ad99
test: refactoring
pcheremu Jan 10, 2024
ee2ba14
test: refactoring
pcheremu Jan 10, 2024
873c99c
test: refactoring
pcheremu Jan 10, 2024
84f42f9
test: refactoring after rebase
pcheremu Jan 10, 2024
8b044fb
test: refactoring eslint
pcheremu Jan 10, 2024
89b932c
test: fix test names add account test to the workflow
pcheremu Jan 11, 2024
d696cff
test: fix test names add account test to the workflow
pcheremu Jan 11, 2024
baf2be0
test: fix eslint
pcheremu Jan 16, 2024
d7efb04
test: fix redirection to documentation
pcheremu Jan 16, 2024
5df5612
test: fix redirection to documentation
pcheremu Jan 16, 2024
6697fce
test: fix links
pcheremu Jan 17, 2024
c6b606b
test: refactoring
pcheremu Jan 17, 2024
71bd1be
test: fix portal url
pcheremu Jan 17, 2024
859547d
Update packages/integration-tests/tests/api/accounts.test.ts
pcheremu Jan 18, 2024
2974ffc
chore: update the Blocks suite name
abilevych Jan 18, 2024
f273293
test: fix names in tests
pcheremu Jan 18, 2024
499427e
test: refactoring
pcheremu Jan 18, 2024
c6f65fc
chore: api retry logic for tests
abilevych Jan 11, 2024
98bdb63
fix: lint issues
abilevych Jan 11, 2024
e0d2f3d
chore: changed timeouts
abilevych Jan 16, 2024
dbda4e2
chore: integration api tests refactoring
abilevych Jan 17, 2024
c7cc2aa
chore: excluded unstable test
abilevych Jan 17, 2024
48cbafd
chore: jest retry option, fix lint
abilevych Jan 17, 2024
a27d2bf
chore: refactoring test actualization after rebase
abilevych Jan 18, 2024
8bd87a6
fix: lint issue
abilevych Jan 18, 2024
5036e56
chore: exclude gating test
abilevych Jan 18, 2024
0d18c01
chore: excluded unstable tests
abilevych Jan 18, 2024
aa81f2f
chore: updated retry-logic for integration api tests
abilevych Jan 23, 2024
a022e2d
fix: integration api tests for the CI run
abilevych Jan 23, 2024
ede57ed
chore: refactoring leftovers in the test solution
abilevych Jan 23, 2024
e086abb
chore: optimized integration API tests
abilevych Jan 23, 2024
2e01d50
chore: refactored jest config
abilevych Jan 23, 2024
e643147
chore: refactoring test retry method
abilevych Jan 24, 2024
6359a75
test: covering tokens API endpoints tc1803 (#155)
amelnytskyi Jan 30, 2024
0b68330
test: fix readme docker command (#158)
pcheremu Jan 30, 2024
c27387a
test: covering Batches API and partially covered Transactions (#156)
amelnytskyi Jan 30, 2024
f586504
feat: new automation tests for accounts API (#163)
olehbairak Feb 6, 2024
b51651f
test: fixing gating transactions tests (#162)
amelnytskyi Feb 7, 2024
28a0a1e
test: rebase integration tests to main (#167)
pcheremu Feb 12, 2024
6eba905
test: fix a new line typos
pcheremu Feb 13, 2024
5fde3c2
test: remove a version from docker compose
pcheremu Feb 13, 2024
389b8f1
test: roll back the version to the docker compose file
pcheremu Feb 13, 2024
afe79c0
fix: remove docker version (#169)
vasyl-ivanchuk Feb 14, 2024
acd8037
test: debug step - revert these changes
pcheremu Jul 9, 2024
0fe5b65
test: debug step 2 - revert these changes
pcheremu Jul 9, 2024
3ea2801
test: debug 0 balance on L1
pcheremu Jul 10, 2024
b13fab5
test: fix before ether upgrade
pcheremu Jul 15, 2024
01953e4
test: fixes part one
pcheremu Jul 24, 2024
ee8384e
test: second part of fixes
pcheremu Jul 25, 2024
15e1677
test: first test run
pcheremu Jul 25, 2024
9da4a4f
test: refactoring
pcheremu Jul 25, 2024
31ddf8b
test: refactoring
pcheremu Jul 25, 2024
6fed949
test: refactoring
pcheremu Jul 25, 2024
65cf8d4
test: fix nonce for mintNFT
pcheremu Jul 31, 2024
ef939b9
test: test with and without a timeout
pcheremu Jul 31, 2024
aab65fc
test: debug timeout issue
pcheremu Jul 31, 2024
e6c55b5
test: debug helper issue
pcheremu Jul 31, 2024
120fa02
test: refactoring
pcheremu Jul 31, 2024
e112bf3
test: fix timeout
pcheremu Aug 2, 2024
e94d3a5
test: refactoring
pcheremu Aug 2, 2024
00ee9e7
test: docker compose update the command
pcheremu Aug 2, 2024
fb6b656
test: unset timeout
pcheremu Aug 2, 2024
f0d96e0
test: refactoring
pcheremu Aug 2, 2024
6efa7c7
test: fake qwe test and commented glogal.ts
pcheremu Aug 2, 2024
998c36b
test: test compilation
pcheremu Aug 2, 2024
44e8191
test: replace contracts
pcheremu Aug 2, 2024
fff3d4a
test: basic run
pcheremu Aug 13, 2024
9002ffd
test: adding L2 contract
pcheremu Aug 13, 2024
33458a2
test: data fetcher cfg change timeout
pcheremu Aug 14, 2024
9a7ce90
test: new read method
pcheremu Aug 14, 2024
27de036
test: change execute method
pcheremu Aug 14, 2024
a9defa5
test: return global config back
pcheremu Aug 14, 2024
e3d8fd0
test: refactoring scripts to default settings
pcheremu Aug 14, 2024
ed71183
test: return accounts.test.ts
pcheremu Aug 19, 2024
6f9eea7
test: return addresses
pcheremu Aug 19, 2024
2d63808
test: return other tests
pcheremu Aug 19, 2024
3888c4f
test: fix logs test
pcheremu Aug 19, 2024
5b05de5
test: split transactions
pcheremu Aug 19, 2024
6f52066
test: return transactions
pcheremu Aug 19, 2024
33db050
test: tx fix
pcheremu Aug 19, 2024
643ace8
test: fix tx all
pcheremu Aug 19, 2024
f344fe4
test: return e2e tests
pcheremu Aug 20, 2024
57eabe3
test: fix e2e
pcheremu Aug 20, 2024
d4a6500
test: refactoring return lic check
pcheremu Aug 20, 2024
36178dc
test: refactoring paymaster
pcheremu Aug 20, 2024
dbd8ee4
test: node 20 by default and WTFPL lic added
pcheremu Aug 20, 2024
5a30179
test: added several new lic
pcheremu Aug 20, 2024
8d185d5
test: return node back
pcheremu Aug 20, 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
4 changes: 0 additions & 4 deletions .github/workflows/app-deploy-feature-branch.yml
Original file line number Diff line number Diff line change
Expand Up @@ -28,10 +28,6 @@ jobs:
node-version: '18'
cache: 'npm'

- name: Install Firebase CLI and auth
run: |
npm install -g firebase-tools

- name: Install dependencies
working-directory: ./
run: |
Expand Down
24 changes: 11 additions & 13 deletions .github/workflows/app-e2e.yml
Original file line number Diff line number Diff line change
Expand Up @@ -47,22 +47,22 @@ 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 }}'
container:
image: mcr.microsoft.com/playwright:v1.27.0-focal
options: --user 1001
options: --user root
steps:
- uses: actions/checkout@v3
with:
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
15 changes: 14 additions & 1 deletion .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 All @@ -55,7 +63,12 @@ lerna-debug.log*
!.vscode/extensions.json

# Allure
**allure-results/
#Allure results and artifacts
**/allure-results/
**/e2e/artifacts/
**/playbook/artifacts*
**/playbook/cache*
**/buffer/*.txt

# App hyperchain config
hyperchain.config.json
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
5 changes: 2 additions & 3 deletions docker-compose.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -117,12 +117,11 @@ services:
test: curl --fail http://localhost:3071/health || exit 1
interval: 10s
timeout: 5s
retries: 60
start_period: 30s
retries: 300
restart: unless-stopped

volumes:
reth:
postgres:
zksync-config:
zksync-data:
zksync-data:
Loading
Loading