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 copy rebase #265

Closed
wants to merge 151 commits into from

Conversation

pcheremu
Copy link
Contributor

@pcheremu pcheremu commented Jul 8, 2024

What ❔

Rebase of the long living branch

Why ❔

Checklist

  • PR title corresponds to the body of PR (we generate changelog entries from PRs).
  • Tests for the changes have been added / updated.
  • Documentation comments have been added / updated.

vasyl-ivanchuk and others added 30 commits February 24, 2024 13:04
# What ❔

Add transaction error reason transformer.

## Why ❔

To unsure error and reason are transformed correctly.

## Checklist

<!-- Check your PR fulfills the following items. -->
<!-- For draft PRs check the boxes as you complete them. -->

- [X] PR title corresponds to the body of PR (we generate changelog
entries from PRs).
# What ❔

Add graceful shutdown timeout.

## Why ❔

To ensure that we can gracefully process all incoming HTTP requests
before shutting down the service.

## Checklist

<!-- Check your PR fulfills the following items. -->
<!-- For draft PRs check the boxes as you complete them. -->

- [X] PR title corresponds to the body of PR (we generate changelog
entries from PRs).
- [X] Tests for the changes have been added / updated.
# What ❔

Add filter by transfer type to the address transfers endpoint

## Why ❔

It is useful to be able to get a list of transfers of certain type for
address. For example get list of withdrawals.
# What ❔

- add script to migrate address transfer type

## Why ❔

- standard migration would not be able to complete, script uses parallel
connections and updates data in small chunks.
# What ❔

New goerli deprecation message with a specific deprecation date:
<img width="1143" alt="image"
src="https://github.com/matter-labs/block-explorer/assets/6553665/3bb8b99e-4998-40c4-8100-e4144fa8aa81">

## Why ❔

To notify users when the deprecation is gonna happen.

## Checklist

<!-- Check your PR fulfills the following items. -->
<!-- For draft PRs check the boxes as you complete them. -->

- [X] PR title corresponds to the body of PR (we generate changelog
entries from PRs).
# What ❔

1. Log timestamp in ISO8601 format.
2. Internal retries for `DataFetcherService`.

## Why ❔

1. To have timestamps properly processed so logs are in the correct
order.
2. Otherwise in case of an error the whole batch is retried which is
unnecessary.

## Checklist

<!-- Check your PR fulfills the following items. -->
<!-- For draft PRs check the boxes as you complete them. -->

- [X] PR title corresponds to the body of PR (we generate changelog
entries from PRs).
- [X] Tests for the changes have been added / updated.
# What ❔

Get rid of the separate interceptor that transforms `BigNumber` to
string, accomplish the same result overriding `BigNumber` `toJSON`
function.

## Why ❔

Separate interceptor is not optimal especially for blocks with lots of
related data, which we btw expect to see more often with higher TPS.
There are blocks where all related info weights 2Mb+ and it takes ~200ms
to transform the whole response object by the interceptor. Since after
the transformation JSON serialisation happens anyway, we can just
override `toJSON` for `BigNumber` and it will be picked up during JSON
serialisation. I checked that with this change generated response is the
same.

Performance improvement for large payloads (2Mb+):
1. Serialisation with interceptor (interceptor + json serialiser): avg
290ms
2. Serialisation with overridden `toJSON` (json serialiser): avg 34ms

But most important event loop is not blocked for a long time.

## Checklist

<!-- Check your PR fulfills the following items. -->
<!-- For draft PRs check the boxes as you complete them. -->

- [X] PR title corresponds to the body of PR (we generate changelog
entries from PRs).
- [X] Tests for the changes have been added / updated.
# What ❔

Remove goerli network.

## Why ❔

Clean up the codebase since we stop supporting Goerli network.

## Checklist

<!-- Check your PR fulfills the following items. -->
<!-- For draft PRs check the boxes as you complete them. -->

- [X] PR title corresponds to the body of PR (we generate changelog
entries from PRs).
- [X] Tests for the changes have been added / updated.
- [X] Documentation comments have been added / updated.
# What ❔

Increase default timeout settings.

## Why ❔

To make sure explorer can handle large transactions.

## Checklist

<!-- Check your PR fulfills the following items. -->
<!-- For draft PRs check the boxes as you complete them. -->

- [X] PR title corresponds to the body of PR (we generate changelog
entries from PRs).
- [X] Tests for the changes have been added / updated.
# What ❔

Rename root hash on the block screen to block hash.

## Checklist

<!-- Check your PR fulfills the following items. -->
<!-- For draft PRs check the boxes as you complete them. -->

- [X] PR title corresponds to the body of PR (we generate changelog
entries from PRs).
- [X] Tests for the changes have been added / updated.
# What ❔

Fix docker compose by applying the same updates that were done in
[local-setup](https://github.com/matter-labs/local-setup.)

## Why ❔

Old docker compose doesn't work with the latest `local-node` docker
image.

## Checklist

<!-- Check your PR fulfills the following items. -->
<!-- For draft PRs check the boxes as you complete them. -->

- [X] PR title corresponds to the body of PR (we generate changelog
entries from PRs).
# What ❔

Fix explorer so that a defined bridge address is not required.

## Why ❔

In-memory node doesn't have L1 network and bridge addresses defined.
This fix make explorer work with the in-memory node.

## Checklist

<!-- Check your PR fulfills the following items. -->
<!-- For draft PRs check the boxes as you complete them. -->

- [X] PR title corresponds to the body of PR (we generate changelog
entries from PRs).
- [X] Tests for the changes have been added / updated.
# What ❔
Migrate firebase jobs on self-hosted runners. 

## Why ❔
For make contribution in frontend app from forks

## Checklist

<!-- Check your PR fulfills the following items. -->
<!-- For draft PRs check the boxes as you complete them. -->

- [x] PR title corresponds to the body of PR (we generate changelog
entries from PRs).
- [x] Tests for the changes have been added / updated.
- [x] Documentation comments have been added / updated.
abilevych and others added 21 commits July 5, 2024 14:57
# What ❔

Added test for TC id1803 /tokens/{address}/transfers endpoint

## Why ❔

Expand test coverage - id1803 wasn't covered by autotest

## Checklist

- [ +] PR title corresponds to the body of PR (we generate changelog
entries from PRs).
- [ ] Tests for the changes have been added / updated.
- [ ] Documentation comments have been added / updated.
# What ❔

Fix a typo for deprecated docker command

## Why ❔

to run command without an error

## Checklist


- [ +] PR title corresponds to the body of PR (we generate changelog
entries from PRs).
- [ -] Tests for the changes have been added / updated.
- [ +] Documentation comments have been added / updated.
covering Batches API

# What ❔

1506 [Transactions] /transactions response returns elements (wasn't
covered fully)
1513 [Batches] /batches response returns elements (wasn't covered fully)
1510 [Transactions] /address/{address}/logs response returns elements
(wasn't covered fully)
1656 [Transactions] Verify failed tx (new test)
1655 [Transactions] Verify deployed the own ERC20 token contract in BE
(new test)

## Why ❔

Why are these changes done? - expanding test coverage

## Checklist

- [ +] PR title corresponds to the body of PR (we generate changelog
entries from PRs).
- [ +] Tests for the changes have been added / updated.
- [ n/a] Documentation comments have been added / updated.
# What ❔

- new API integration tests to cover account API functionality

**_List of test cases for automation:_**

- [x] [[Account API] /api?module=account&action=txlistinternal&address=
response returns
elements](https://allure.matterlabs.dev/project/11/test-cases/1852?treeId=22)
- [x] [[Account API]
/api?module=account&action=getminedblocks](https://allure.matterlabs.dev/project/11/test-cases/1807?treeId=22)
- [x] [[Account API] /api?module=account&action=tokentx response returns
elements](https://allure.matterlabs.dev/project/11/test-cases/1805?treeId=22)
- [x] [[Account API] /api?module=account&action=txlistinternal response
returns
elements](https://allure.matterlabs.dev/project/11/test-cases/1804?treeId=22)
- [x] [[Account API] /api?module=account&action=tokennfttx response
returns
elements](https://allure.matterlabs.dev/project/11/test-cases/1806?treeId=22)

## Why ❔

- to increase coverage of the automation test suite and cover accounts
API part

## Checklist


- [ +] PR title corresponds to the body of PR (we generate changelog
entries from PRs).
- [ +] Tests for the changes have been added / updated.
- [ -] Documentation comments have been added / updated.
# What ❔

Fixed disabled (xdescribe and xit)
/transactions/{transactionHash}/transfers tests and turned them on back

## Why ❔

/transactions/{transactionHash}/transfers tests were disabled since they
were outdated

## Checklist


- [ +] PR title corresponds to the body of PR (we generate changelog
entries from PRs).
- [ +] Tests for the changes have been added / updated.
- [ -] Documentation comments have been added / updated.
# What ❔

Remove docker version

## Why ❔

Because it's not necessary to specify it.
@pcheremu pcheremu self-assigned this Jul 8, 2024
@pcheremu pcheremu added the automation writing/fixing/maintaining auto-tests/e2e-tests label Jul 8, 2024
Copy link

github-actions bot commented Jul 8, 2024

Unit Test Results

0 files   -     4  0 suites   - 263   0s ⏱️ - 13m 42s
0 tests  - 2 079  0 ✅  - 2 078  0 💤  - 1  0 ❌ ±0 
0 runs   - 2 284  0 ✅  - 2 283  0 💤  - 1  0 ❌ ±0 

Results for commit 609ab8d. ± Comparison against base commit 946b0f6.

♻️ This comment has been updated with latest results.

Copy link

github-actions bot commented Jul 8, 2024

API E2E Test Results

207 tests  +1   207 ✅ +1   19s ⏱️ -9s
 14 suites ±0     0 💤 ±0 
  1 files   ±0     0 ❌ ±0 

Results for commit 609ab8d. ± Comparison against base commit 946b0f6.

♻️ This comment has been updated with latest results.

@pcheremu pcheremu changed the title test: Integration test copy rebase test: integration test copy rebase Jul 8, 2024
@pcheremu pcheremu closed this Jul 8, 2024
@pcheremu pcheremu deleted the integration-test-copy-rebase branch July 8, 2024 12:08
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
automation writing/fixing/maintaining auto-tests/e2e-tests
Projects
None yet
Development

Successfully merging this pull request may close these issues.

7 participants