Skip to content
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

[Testing] Port relevant E2E tests from fetchai/ledger-subquery #4

Closed
7 tasks
bryanchriswhite opened this issue Jul 3, 2024 · 1 comment
Closed
7 tasks
Labels

Comments

@bryanchriswhite
Copy link
Owner

bryanchriswhite commented Jul 3, 2024

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

  • Eliminate the need for manual testing (i.e. prior to merging a PR).
  • Further minimize the likelihood of bugs being merged to main.
  • Mitigate regressions by providing structure and precedent for different test scenarios.

Deliverables

Recommend the following tools:

  • stretchr/testify suites to split tests into:
    • 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.

Creator: @bryanchriswhite
Co-Owners: [sign up here!]

@bryanchriswhite
Copy link
Owner Author

Moved to pokt-network/pocketdex#3

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

1 participant