mesh-cli
tool uses the Mesh SDK (mesh-sdk-go) to validate the correctness of both Mesh Data API and Construction API implementations.
--configuration-file
) that you provide at runtime. If you do not provide a configuration file, the tool uses the default configuration, for example, default.json.
To run tests against Bitcoin and Ethereum implementations, see these config samples for mesh-bitcoin and mesh-ethereum.
For more information on how to create a configuration file, read How to Write a Configuration File for mesh-cli testing.
/account/balance
endpoint?). Take a look at the simple configuration for an example of how to do this. For more details, read our How to Disable Complex Checks documentation.
check:construction
test in mesh-cli) uses a design pattern that allows for complex transaction construction orchestration.
Most engineers write their check:construction
tests using the Mesh Constructor DSL. We have examples of DSL files written for UTXO-based chains and account-based chains. For more information, read How to Write a Mesh DLS File.
mesh-cli
tool in a continuous integration (CI) job, it is usually desired to exit when certain conditions are met (or before then with an exit code of 1
). We provide this functionality through the use of end conditions which you can specify in your configuration file.
check:data
end conditions in How to Write a Configuration File, and in the Go Configuration website. If any end condition is satisfied, the tool exits and output the results in the results output file, if the results_output_file
field’s value is populated.
check:construction
end condition is a map of workflow:count
that indicates how many of each workflow should be performed before check:construction
stops. For example, {"create_account": 5}
indicates that 5 create_account
workflows should be performed before stopping.
Unlike check:data
, all check:construction
end conditions must be satisfied before the mesh-cli
tool exits.
check:data
or check:construction
, the tests will exit with a 0
status code. If there are any issues, they will exit with a 1
status code. It can be useful to run this command as an integration test for any changes to your implementation.