-
Notifications
You must be signed in to change notification settings - Fork 404
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
Unit tests for caliper-ethereum #1556
Comments
Hey @davidkel . I'd like to work on this issue if this is available ! |
@Sweetdevil144 I've assigned it to you |
Thanks @davidkel . Also, can you help me with a heads up for this step? What should be my network configurations when mocking |
@Sweetdevil144 all I can suggest is review how the caliper-fabric does it's tests. I'm not actually familiar with the ethereum package sorry. The caliper-fabric tests are the pattern to follow. |
Created tests for let configPath = CaliperUtils.resolvePath(ConfigUtil.get(ConfigUtil.keys.NetworkConfig));
console.log(`Config Path: ${JSON.stringify(configPath)}`);
let ethereumConfig;
try {
ethereumConfig = require(configPath).ethereum;
} catch (error) {
console.error(`Error requiring configPath: ${error}`);
throw error;
} Original code lines were as follow : https://github.com/hyperledger/caliper/blob/ae23774d7bba51b55980cdc9110b11729aab96f7/packages/caliper-ethereum/lib/ethereum-connector.js#L46 Error logs :
Take a look at my current test file from : here to know how I'm mocking the data. (I found some test network configs for ethereum pre-created, utilising the same for now). |
This package has no unit tests at all
New tests should not assume that the code is actually correct. It's expected that if the tests finds bugs or relevant situations where unexpected behaviour occurs then the code should also be fixed.
The text was updated successfully, but these errors were encountered: