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

fix: 3152 spendingplan as env var acceptance test fix #3184

Closed
wants to merge 16 commits into from

Conversation

ebadiere
Copy link
Collaborator

This PR is a branch of PR#3153 with the HBar Rate Limiter fix in the acceptance tests. Using a new branch because there is odd behavior in github ATM.

Related issue(s):

Fixes #3152

ebadiere and others added 16 commits October 23, 2024 15:32
…tent.

Signed-off-by: ebadiere <[email protected]>

fix: removed .only

Signed-off-by: ebadiere <[email protected]>

fix: Cleaned up file and env var evaluation.

Signed-off-by: ebadiere <[email protected]>

fix: Flaky unit test fix.

Signed-off-by: ebadiere <[email protected]>

feat: Refactored implementation and updated tests.

Signed-off-by: ebadiere <[email protected]>
…_CONFIG

Signed-off-by: ebadiere <[email protected]>

fix: Test fix.

Signed-off-by: ebadiere <[email protected]>

fix: Removed irrelevant test since we now use either env var or file for spending plan.

Signed-off-by: ebadiere <[email protected]>

fix: Updated HBAR_SPENDING_PLANS_CONFIG from HBAR_SPENDING_PLANS_CONFIG_FILE

Signed-off-by: ebadiere <[email protected]>
…s in the

before and after mocha functions.

Signed-off-by: ebadiere <[email protected]>
Co-authored-by: Victor Yanev <[email protected]>
Signed-off-by: Eric Badiere <[email protected]>
…o already

be populated.

Signed-off-by: ebadiere <[email protected]>

fix: Cleanup.

Signed-off-by: ebadiere <[email protected]>
…erent-batches' into 3152-spendingplan-as-env-var

Signed-off-by: ebadiere <[email protected]>
Copy link

sonarcloud bot commented Oct 30, 2024

Copy link

Test Results

    4 files   -  14    418 suites  +172   19s ⏱️ - 35m 10s
1 473 tests +869  1 472 ✅ +875  1 💤  - 3  0 ❌  - 3 
1 482 runs  +826  1 481 ✅ +832  1 💤  - 3  0 ❌  - 3 

Results for commit 011aca2. ± Comparison against base commit ff2c827.

This pull request removes 604 and adds 1473 tests. Note that renamed tests count towards both.
"eth_call" for non-existing contract address returns 0x ‑ RPC Server Acceptance Tests Acceptance tests @api-batch-3 RPC Server Acceptance Tests eth_call "eth_call" for non-existing contract address returns 0x
001 Should call pureMultiply ‑ RPC Server Acceptance Tests Acceptance tests @api-batch-3 RPC Server Acceptance Tests eth_call Caller contract With evm address 001 Should call pureMultiply
001 Should call pureMultiply ‑ RPC Server Acceptance Tests Acceptance tests @api-batch-3 RPC Server Acceptance Tests eth_call Caller contract With long-zero address 001 Should call pureMultiply
002 Should call msgSender ‑ RPC Server Acceptance Tests Acceptance tests @api-batch-3 RPC Server Acceptance Tests eth_call Caller contract With evm address 002 Should call msgSender
002 Should call msgSender ‑ RPC Server Acceptance Tests Acceptance tests @api-batch-3 RPC Server Acceptance Tests eth_call Caller contract With long-zero address 002 Should call msgSender
003 Should call txOrigin ‑ RPC Server Acceptance Tests Acceptance tests @api-batch-3 RPC Server Acceptance Tests eth_call Caller contract With evm address 003 Should call txOrigin
003 Should call txOrigin ‑ RPC Server Acceptance Tests Acceptance tests @api-batch-3 RPC Server Acceptance Tests eth_call Caller contract With long-zero address 003 Should call txOrigin
004 Should call msgSig ‑ RPC Server Acceptance Tests Acceptance tests @api-batch-3 RPC Server Acceptance Tests eth_call Caller contract With evm address 004 Should call msgSig
004 Should call msgSig ‑ RPC Server Acceptance Tests Acceptance tests @api-batch-3 RPC Server Acceptance Tests eth_call Caller contract With long-zero address 004 Should call msgSig
005 Should call addressBalance ‑ RPC Server Acceptance Tests Acceptance tests @api-batch-3 RPC Server Acceptance Tests eth_call Caller contract With evm address 005 Should call addressBalance
…
"eth_blockNumber" return the latest block number on second try ‑ @ethGetBlockByNumber using MirrorNode "eth_blockNumber" return the latest block number on second try
"eth_blockNumber" should return the latest block number using cache ‑ @ethGetBlockByNumber using MirrorNode "eth_blockNumber" should return the latest block number using cache
"eth_blockNumber" should return the latest block number ‑ @ethGetBlockByNumber using MirrorNode "eth_blockNumber" should return the latest block number
"eth_blockNumber" should throw an error if no blocks are found after third try ‑ @ethGetBlockByNumber using MirrorNode "eth_blockNumber" should throw an error if no blocks are found after third try
"eth_blockNumber" should throw an error if no blocks are found ‑ @ethGetBlockByNumber using MirrorNode "eth_blockNumber" should throw an error if no blocks are found
Adds a revertReason field for receipts with errorMessage ‑ @ethGetTransactionReceipt eth_getTransactionReceipt tests Adds a revertReason field for receipts with errorMessage
BLOCK_HASH filter timeouts and throws the expected error ‑ @ethGetLogs using MirrorNode timeout BLOCK_HASH filter timeouts and throws the expected error
BLOCK_HASH filter ‑ @ethGetLogs using MirrorNode BLOCK_HASH filter
Can extract the account number out of an account pagination next link url ‑ MirrorNodeClient Can extract the account number out of an account pagination next link url
Can extract the evm address out of an account pagination next link url ‑ MirrorNodeClient Can extract the evm address out of an account pagination next link url
…
This pull request removes 4 skipped tests and adds 1 skipped test. Note that renamed tests count towards both.
011 Should fail when calling msgValue with more value than available balance ‑ RPC Server Acceptance Tests Acceptance tests @api-batch-3 RPC Server Acceptance Tests eth_call Caller contract With evm address 011 Should fail when calling msgValue with more value than available balance
011 Should fail when calling msgValue with more value than available balance ‑ RPC Server Acceptance Tests Acceptance tests @api-batch-3 RPC Server Acceptance Tests eth_call Caller contract With long-zero address 011 Should fail when calling msgValue with more value than available balance
from/to Addresses in transaction to a contract (deployed through HAPI tx) are in evm and long-zero format ‑ RPC Server Acceptance Tests Acceptance tests @api-batch-2 RPC Server Acceptance Tests Formats of addresses in Transaction and Receipt results from/to Addresses in transaction to a contract (deployed through HAPI tx) are in evm and long-zero format
should not return contract bytecode after sefldestruct ‑ RPC Server Acceptance Tests Acceptance tests @api-batch-2 RPC Server Acceptance Tests eth_getCode should not return contract bytecode after sefldestruct
supports optionality of request id when configured ‑ RPC Server given REQUEST_ID_IS_OPTIONAL=true are set supports optionality of request id when configured

@ebadiere ebadiere self-assigned this Oct 30, 2024
@ebadiere ebadiere added the bug Something isn't working label Oct 30, 2024
@ebadiere ebadiere added this to the 0.59.0 milestone Oct 30, 2024
@ebadiere ebadiere changed the title 3152 spendingplan as env var acceptance test fix fix: 3152 spendingplan as env var acceptance test fix Oct 30, 2024
@ebadiere
Copy link
Collaborator Author

ebadiere commented Nov 1, 2024

Covered by #3201

@ebadiere ebadiere closed this Nov 1, 2024
Copy link

codecov bot commented Nov 1, 2024

Codecov Report

Attention: Patch coverage is 66.66667% with 4 lines in your changes missing coverage. Please review.

Project coverage is 83.22%. Comparing base (c2f5278) to head (011aca2).
Report is 10 commits behind head on main.

Files with missing lines Patch % Lines
...ay/src/lib/config/hbarSpendingPlanConfigService.ts 66.66% 2 Missing and 2 partials ⚠️
Additional details and impacted files
@@            Coverage Diff             @@
##             main    #3184      +/-   ##
==========================================
- Coverage   83.39%   83.22%   -0.18%     
==========================================
  Files          66       66              
  Lines        4283     4287       +4     
  Branches      835      836       +1     
==========================================
- Hits         3572     3568       -4     
- Misses        471      474       +3     
- Partials      240      245       +5     
Flag Coverage Δ
config-service 98.14% <ø> (ø)
relay 85.38% <66.66%> (-0.23%) ⬇️
server 83.52% <ø> (ø)
ws-server 36.87% <ø> (ø)

Flags with carried forward coverage won't be shown. Click here to find out more.

Files with missing lines Coverage Δ
...ckages/config-service/src/services/globalConfig.ts 100.00% <ø> (ø)
...ay/src/lib/config/hbarSpendingPlanConfigService.ts 92.66% <66.66%> (-5.44%) ⬇️

... and 2 files with indirect coverage changes

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
Status: Done
Development

Successfully merging this pull request may close these issues.

Add the ability for spending plans to be defined using environment variables.
2 participants