You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Setup: Use the poktroll client APIs (docs) to trigger on-chain activity which should cause the entities under test to be indexed.
DB Query: Use go-pg to query postgres directly to assert that the mapping handlers stored the expected entities with the expected data.
GQL Query: Use hasura-go-graphql-client to query the postgraphile backend and assert that the entities under test exist are accessible via GQL and are populated with the expected data.
Non-goals / Non-deliverables
Porting additional tests.
Refactoring bulid scripts or tooling.
Automating test execution in CI.
General deliverables
Comments: Add/update TODOs and comments alongside the source code so it is easier to follow.
Testing: Add new tests (unit and/or E2E) to the test suite.
Package.json scripts: Add new scripts to the package.json to make the new functionality easier to use.
Documentation: Update architectural or development READMEs; use mermaid diagrams where appropriate.
Objective
Establish a foundation for automated testing in the repo.
Initially this will be usable locally, along-side a Shannon localnet.
Origin Document
Foundational.
Goals
main
.Deliverables
test_native_primatives.py
to a golang implementation.test_native_transfer.py
to a golang implementation.test_native_balances.py
to a golang implementation.Recommend the following tools:
stretchr/testify
suite
s to split tests into:go-pg
to query postgres directly to assert that the mapping handlers stored the expected entities with the expected data.hasura-go-graphql-client
to query the postgraphile backend and assert that the entities under test exist are accessible via GQL and are populated with the expected data.Non-goals / Non-deliverables
General deliverables
Creator: @bryanchriswhite
Co-Owners: [sign up here!]
The text was updated successfully, but these errors were encountered: