cacti icon indicating copy to clipboard operation
cacti copied to clipboard

test(plugin-htlc-eth-besu): fix failed to resolve env var ETHERSCAN_KEY

Open petermetz opened this issue 1 year ago • 1 comments

Description

In the CI job called cactus-test-plugin-htlc-eth-besu we have a failure due to some API key missing.

Logs

Run cd packages/cactus-plugin-htlc-eth-besu && forge test -vvvvv
Compiling 21 files with 0.8.19
Solc 0.8.19 finished in 1.46s
Compiler run successful with warnings:
Warning (2018): Function state mutability can be restricted to pure
   --> src/test/solidity/integration/PrivateHashTimeLock.t.sol:153:5:
    |
153 |     function calculateHashSecret(uint256 base, uint256 exponent, uint256 modulus)
    |     ^ (Relevant source part starts here and spans across multiple lines).

Error: 
Failed to resolve env var `ETHERSCAN_KEY` in `${ETHERSCAN_KEY}`: environment variable not found

Context:
- environment variable not found
Error: Process completed with exit code 1.

Acceptance Criteria

  1. Tests in cactus-test-plugin-htlc-eth-besu are passing.
  2. We did not pay for an API key - if that's the only way tests can be made passing then we should re-design the test cases.

petermetz avatar Mar 11 '24 16:03 petermetz

@RafaelAPB Do you happen to remember any context about this etherscan API key? I'm assuming these tests were passing originally but wondering how.

petermetz avatar Mar 11 '24 16:03 petermetz

fixed by: #3300 , the code change for ci.yaml file with regards to ETHERSCAN_KEY fixed this issue and ctp-htlc-eth-besu is running successfully. Thank you.

ruzell22 avatar Jun 18 '24 06:06 ruzell22