Open ashnashahgrover opened 3 months ago
This issue is a dependency of https://github.com/hyperledger/cacti/issues/3475
@jagpreetsinghsasan I tried to replicate the issue mentioned here on my machine and was unable to do so. Uploading here the evidence of the passing tests to close this issue.
geth-invoke-web3-method-v1.test.ts geth-contract-deploy-and-invoke-using-keychain-v1.test.ts geth-contract-deploy-and-invoke-using-json-object-v1.test.ts
We can close this ticket then @adrianbatuto @petermetz shall we close it?
@jagpreetsinghsasan @adrianbatuto Did you test it on main
or on the branch where @ashnashahgrover was working on the migration of the negative test case assertions? I think it only reproduced on the branch of Ashna ( https://github.com/hyperledger-cacti/cacti/pull/3496/files )
If you tried it on main, then please try it on the branch of ( https://github.com/hyperledger-cacti/cacti/pull/3496/files ) instead and let's see. If you did try it on the branch ( https://github.com/hyperledger-cacti/cacti/pull/3496/files ) and it works then please submit a pull request with the refactored version of the assertions for the negative test cases and then we can close these issues down at the same time.
@jagpreetsinghsasan @adrianbatuto Did you test it on
main
or on the branch where @ashnashahgrover was working on the migration of the negative test case assertions? I think it only reproduced on the branch of Ashna ( https://github.com/hyperledger-cacti/cacti/pull/3496/files )If you tried it on main, then please try it on the branch of ( https://github.com/hyperledger-cacti/cacti/pull/3496/files ) instead and let's see. If you did try it on the branch ( https://github.com/hyperledger-cacti/cacti/pull/3496/files ) and it works then please submit a pull request with the refactored version of the assertions for the negative test cases and then we can close these issues down at the same time.
@petermetz, I encountered the errors mentioned here while I was working on another ticket #3475 and updating the tests. I will look into this issue more.
@adrianbatuto Got it, thank you! Let me know how it went!
Describe the bug
Multiple tests are failing in cactus-plugin-ledger-connector-ethereum/src/test/typescript/integration including:
To Reproduce
Run these tests in run and debug and note the failing tests in the terminal output.
Expected behavior
The failing tests should pass - contingent upon the jest assertions in those tests also passing. If the test description says the specific function called should return an error, it should return an error and not a resolved promise.
Log/Stack Traces
Full file:
broken-ethereum-tests.log
Relevent snippets:
` FAIL packages/cactus-plugin-ledger-connector-ethereum/src/test/typescript/integration/geth-contract-deploy-and-invoke-using-json-object-v1.test.ts (73.064 s, 757 MB heap size) Ethereum contract deploy and invoke using keychain tests ✓ setup ethereum connector (4180 ms) ✓ deploys contract using json object (5040 ms) ✓ deploys contract using json object with constructorArgs (5139 ms) ✓ deployContract without contractJSON should fail (98 ms) ✕ deployContract with additional parameters should fail (5030 ms) ✓ invoke Web3SigningCredentialType.GETHKEYCHAINPASSWORD (10230 ms) ✓ invoke Web3SigningCredentialType.PrivateKeyHex (4171 ms) ✓ invokeContractV1 without methodName should fail (45 ms)
● Ethereum contract deploy and invoke using keychain tests › deployContract with additional parameters should fail
Test Suites: 1 failed, 1 total Tests: 1 failed, 7 passed, 8 total Snapshots: 0 total Time: 73.156 s Ran all test suites matching /packages\/cactus-plugin-ledger-connector-ethereum\/src\/test\/typescript\/integration\/geth-contract-deploy-and-invoke-using-json-object-v1.test.ts/i. Waiting for the debugger to disconnect...`
` FAIL packages/cactus-plugin-ledger-connector-ethereum/src/test/typescript/integration/geth-invoke-web3-method-v1.test.ts (24.625 s, 641 MB heap size) invokeRawWeb3EthMethod Tests ✓ invoke method using json-rpc proxy (48 ms) ✓ invokeRawWeb3EthMethod with 0-argument method works (getGasPrice) (9 ms) ✓ invokeRawWeb3EthMethod with 1-argument method works (getBlock) (24 ms) ✓ invokeRawWeb3EthMethod with 2-argument method works (getStorageAt) (15 ms) ✕ invokeRawWeb3EthMethod with missing arg throws error (getBlock) (13 ms) ✓ invokeRawWeb3EthMethod with invalid arg throws error (getBlock) (30 ms) ✓ invokeRawWeb3EthMethod with non existing method throws error (3 ms)
● invokeRawWeb3EthMethod Tests › invokeRawWeb3EthMethod with missing arg throws error (getBlock)
Test Suites: 1 failed, 1 total Tests: 1 failed, 6 passed, 7 total Snapshots: 0 total Time: 24.71 s, estimated 25 s Ran all test suites matching /packages\/cactus-plugin-ledger-connector-ethereum\/src\/test\/typescript\/integration\/geth-invoke-web3-method-v1.test.ts/i.`
` FAIL packages/cactus-plugin-ledger-connector-ethereum/src/test/typescript/integration/geth-contract-deploy-and-invoke-using-keychain-v1.test.ts (68.848 s, 658 MB heap size) Ethereum contract deploy and invoke using keychain tests ✓ setup ethereum connector (4245 ms) ✓ deploys contract using keychain (5071 ms) ✓ deploys contract using keychain with constructorArgs (5125 ms) ✓ deployContract without contractName should fail (163 ms) ✕ deployContract with additional parameters should fail (4204 ms) ✓ invoke Web3SigningCredentialType.GETHKEYCHAINPASSWORD (10386 ms) ✓ invoke Web3SigningCredentialType.None (5087 ms) ✓ runTransactionV1 without transaction config should fail (30 ms) ✓ invoke Web3SigningCredentialType.PrivateKeyHex (5171 ms) ✓ invoke Web3SigningCredentialType.CactiKeychainRef (4153 ms) ✓ invokeContractV1 without methodName should fail (27 ms) ✓ get prometheus exporter metrics (10 ms)
● Ethereum contract deploy and invoke using keychain tests › deployContract with additional parameters should fail
Test Suites: 1 failed, 1 total Tests: 1 failed, 11 passed, 12 total Snapshots: 0 total Time: 68.934 s, estimated 70 s Ran all test suites matching /packages\/cactus-plugin-ledger-connector-ethereum\/src\/test\/typescript\/integration\/geth-contract-deploy-and-invoke-using-keychain-v1.test.ts/i.`