Throw away codechain-sdk dependency on foundry tests.#189
Merged
sgkim126 merged 11 commits intoCodeChain-io:masterfrom Feb 22, 2020
Merged
Throw away codechain-sdk dependency on foundry tests.#189sgkim126 merged 11 commits intoCodeChain-io:masterfrom
sgkim126 merged 11 commits intoCodeChain-io:masterfrom
Conversation
In this patch, functions that previously worked with sdk.rpc are replaced by foundry-rpc
In this patch, functions that previously worked with sdk.rpc are replaced by foundry-rpc
In previous commits, we removed stakholder dependecies on sdk.rpc. Now we adapt tests that use sdk.rpc for their tests.
09058bd to
b15c349
Compare
majecty
requested changes
Feb 21, 2020
test/src/e2e/changeParams.test.ts
Outdated
|
|
||
| await expect(node.sendPayTx({ fee: 10 })).rejectedWith(/Too Low Fee/); | ||
| try { | ||
| await expect(node.sendPayTx({ fee: 10 })); |
test/src/e2e/changeParams.test.ts
Outdated
| ).be.true; | ||
| await expect(node.sendPayTx({ fee: 4 })).rejectedWith(/Too Low Fee/); | ||
| try { | ||
| await expect(node.sendPayTx({ fee: 4 })); |
test/src/e2e/changeParams.test.ts
Outdated
| ).not.be.null; | ||
| } | ||
| try { | ||
| await expect(node.sendPayTx({ fee: 10 })); |
test/src/e2e/changeParams.test.ts
Outdated
| /Too Low Fee/ | ||
| ); | ||
| try { | ||
| await expect(node.sendPayTx({ fee: 10 })); |
test/src/e2e/customAction.test.ts
Outdated
| await node.rpc.engine.getCustomActionData({ | ||
| handlerId: hitActionHandlerId, | ||
| bytes: `0x${hitcount}`, | ||
| bytes: `0xca${hitcount}`, |
There was a problem hiding this comment.
Please do not use a magic string (0xca) here.
test/src/e2e/network2.test.ts
Outdated
| ) { | ||
| await wait(500); | ||
| } | ||
| console.log("I am here"); |
test/src/e2e/network2.test.ts
Outdated
| expect( | ||
| await nodeB.testFramework.rpc.network.getPeers() | ||
| ).to.deep.equal([`${address}:${nodeA.port}`]); | ||
| // console.log(await nodeA.rpc.net.getEstablishedPeers()); |
Previously, there were some sdk functions that were not replaced. In this commit, all of them remove and e2e tests rely on foundry rpc completely
The removed rpc was the rpc that is being used in codechian-sdk. We replace it with foundry-rpc-js
Previously, we add some setting in order to exclude sdk and stakeholder when we run yarn fmt. Now, settings are backed to their normal state
Due to previous settings, these files were not include in yarn lint and yarn fmt
majecty
approved these changes
Feb 21, 2020
Closed
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
In this patch and previous patch, we aimed to remove
codechain-sdkdependency and replace tests with foundry-rpc. This patch is the final stage of this work and is designed to removecodechain-sdkdependency on bothstakeholderfunctions ande2e.dynvaltests and eventually get rid ofsdk.rpc. It fixes #107.