-
Notifications
You must be signed in to change notification settings - Fork 283
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(ethereum): fix broken validations in ethereum plugin connector tests #3487
Labels
bug
Something isn't working
Comments
This was referenced Aug 17, 2024
ashnashahgrover
added a commit
to ashnashahgrover/cacti
that referenced
this issue
Aug 26, 2024
…tor-ethereum tests Primary Changes --------------- 1. Added code to deployContract in plugin-ledger-connector-ethereum.ts that checks if any unexpected Arguments are present, and if so throws an error 2. Modified test on line 169 in geth-invoke-web3-method-v1.test.ts so that required argument for invokeRawWeb3EthMethod is missing as required by the test description Fixes hyperledger-cacti#3487 Signed-off-by: ashnashahgrover <ashnashahgrover777@gmail.com>
ashnashahgrover
added a commit
to ashnashahgrover/cacti
that referenced
this issue
Aug 26, 2024
…tor-ethereum tests Primary Changes --------------- 1. Added code to deployContract in plugin-ledger-connector-ethereum.ts that checks if any unexpected arguments are present, and if so throws an error. 2. Modified test on line 169 in geth-invoke-web3-method-v1.test.ts so that required argument for invokeRawWeb3EthMethod is missing as required by the test description. Fixes hyperledger-cacti#3487 Signed-off-by: ashnashahgrover <ashnashahgrover777@gmail.com>
ashnashahgrover
changed the title
test(ethereum): fix broken validations in cactus-plugin-ledger-connector-ethereum tests
test(ethereum): fix broken validations in ethereum plugin connector tests
Aug 26, 2024
ashnashahgrover
added a commit
to ashnashahgrover/cacti
that referenced
this issue
Aug 26, 2024
…ests Primary Changes --------------- 1. Added code to deployContract in plugin-ledger-connector-ethereum.ts that checks if any unexpected arguments are present, and if so throws an error. 2. Modified test on line 169 in geth-invoke-web3-method-v1.test.ts so that required argument for invokeRawWeb3EthMethod is missing as required by the test description. Fixes hyperledger-cacti#3487 Signed-off-by: ashnashahgrover <ashnashahgrover777@gmail.com>
This issue is a dependency of https://github.com/hyperledger/cacti/issues/3475 |
ashnashahgrover
added a commit
to ashnashahgrover/cacti
that referenced
this issue
Aug 27, 2024
Primary Changes --------------- 1. Added code to deployContract in plugin-ledger-connector-ethereum.ts that checks if any unexpected arguments are present, and if so throws an error. 2. Modified test on line 169 in geth-invoke-web3-method-v1.test.ts so that required argument for invokeRawWeb3EthMethod is missing as required by the test description. Fixes hyperledger-cacti#3487 Signed-off-by: ashnashahgrover <ashnashahgrover777@gmail.com>
ashnashahgrover
added a commit
to ashnashahgrover/cacti
that referenced
this issue
Aug 27, 2024
Primary Changes --------------- 1. Added code to deployContract in plugin-ledger-connector-ethereum.ts that checks if any unexpected arguments are present, and if so throws an error. 2. Modified test on line 169 in geth-invoke-web3-method-v1.test.ts so that required argument for invokeRawWeb3EthMethod is missing as required by the test description. Fixes hyperledger-cacti#3487 Signed-off-by: ashnashahgrover <ashnashahgrover777@gmail.com>
ashnashahgrover
added a commit
to ashnashahgrover/cacti
that referenced
this issue
Aug 27, 2024
Primary Changes --------------- 1. Added code to deployContract in plugin-ledger-connector-ethereum.ts that checks if any unexpected arguments are present, and if so throws an error. 2. Modified test on line 169 in geth-invoke-web3-method-v1.test.ts so that required argument for invokeRawWeb3EthMethod is missing as required by the test description. Fixes hyperledger-cacti#3487 Signed-off-by: ashnashahgrover <ashnashahgrover777@gmail.com>
5 tasks
ashnashahgrover
added a commit
to ashnashahgrover/cacti
that referenced
this issue
Sep 21, 2024
Primary Changes --------------- 1. Added code to deployContract in plugin-ledger-connector-ethereum.ts that checks if any unexpected arguments are present, and if so throws an error. 2. Modified test on line 169 in geth-invoke-web3-method-v1.test.ts so that required argument for invokeRawWeb3EthMethod is missing as required by the test description. Fixes hyperledger-cacti#3487 Signed-off-by: ashnashahgrover <ashnashahgrover777@gmail.com>
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
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.`
The text was updated successfully, but these errors were encountered: