Integration tests

Our project ensures the quality and reliability of its features through a suite of integration tests. This section provides an overview of how our integration tests work and how you can leverage them.

Getting Started

Before running any integration tests, it's essential to set up the testing environment correctly:

  1. Generate Test Cases: Our tests rely on specific datasets generated by utility scripts. Execute the generateJsonHash.go script located in the ./scripts directory:

    go run ./scripts/generateJsonHash.go

    This will produce an example.json containing random test cases used in our tests.

  2. Environment: Ensure you have the necessary dependencies installed and set up. (Add any environment-specific instructions here.)

Test Suite

1. triehash_test.go

  • Purpose: This test is vital for validating the integrity of our Merkle Patricia Trie implementation. It loads test cases from the generated example.json and compares the stored hash with a newly computed hash using our library.

  • Execution:

    go test -v ./tests/triehash_test.go
  • Expected Outcome: All assertions should pass, indicating that our library consistently computes the trie hash.

Last updated