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

[E2E relay test] Update to #178 #184

Merged
merged 156 commits into from
Nov 16, 2023
Merged

[E2E relay test] Update to #178 #184

merged 156 commits into from
Nov 16, 2023

Conversation

bryanchriswhite
Copy link
Contributor

@bryanchriswhite bryanchriswhite commented Nov 14, 2023

Summary

Human Summary

This PR is based on a branch that merges #178, main, and #177 and builds on top to get an E2E relay test passing (and failing) for the right reasons.

  • Adds -features-path flag to the E2E go test such that we can select (via glob pattern) which features we want to run on invocation.
  • Implements TheApplicationReceivesASuccessfulRelayResponseSignedBy.
  • Improves error E2E messaging.

To run the relay test (outside of tilt):

# Start the appgate-server (blocks terminal)
poktrolld --home ./localnet/poktrolld appgate-server --signing-key app1 --self-signing --keyring-backend test --node tcp://127.0.0.1:36657

# Start the relayminer (blocks terminal)
poktrolld --home ./localnet/poktrolld/ relayminer --signing-key supplier1 --keyring-backend test --node tcp://127.0.0.1:36657

# Stake supplier1 & app1 so their keys are on-chain
make supplier1_stake && make app1_stake

# Run just the relay feature file
go test -v -tags=e2e ./e2e/tests  -features-path=./relay.feature

AI Summary

Summary generated by Reviewpad on 14 Nov 23 16:09 UTC

This pull request includes the following changes:

  • Added flag package import
  • Added featuresPathFlag and keyRingFlag variables
  • Added features-path flag in TestMain function
  • Renamed TheApplicationSendsTheSupplierARequestForServiceWithData function to TheApplicationSendsTheSupplierARequestForServiceWithData and added code comments
  • Added getRelayKey function
  • Added TheApplicationReceivesASuccessfulRelayResponseSignedBy function
  • Added runCurlPostCmd function in pocketdBin struct
  • Modified error message in ErrAppGateEmptyRelayResponse constant
  • Modified error handling in verifyResponse function in appGateServer struct
  • Modified error handling in VerifyRelayRequest function in relayerProxy struct

Issue

Relates to:

It would be really useful to have the E2E relay test working already such that we can quickly and easily tell if the integration has regressed to a broken state. This should close that loop.

Type of change

Select one or more:

  • New feature, functionality or library
  • Bug fix
  • Code health or cleanup
  • Documentation
  • Other (specify)

Testing

  • Run all unit tests: make go_develop_and_test
  • Verify Localnet manually: See the instructions [here](TODO: add link to instructions)

Sanity Checklist

  • I have tested my changes using the available tooling
  • I have performed a self-review of my own code
  • I have commented my code, updated documentation and left TODOs throughout the codebase

bryanchriswhite and others added 30 commits November 9, 2023 14:41
* pokt/main:
  [Off-chain] feat: observable utils (#171)
  [Off-chain] refactor: `MapFn`s receive context arg (#170)
RelayerOption parameter
- Fixed helpers for localnet regenesis
- Added an application & supplier to the genesis file
- Initializing appMap & supplierMap in E2E tests
- Add support for the app's codec (for unmarshaling responses) in E2E tests
- Adding a placeholder for `e2e/tests/relay.feature`

---

Co-authored-by: harry <[email protected]>
* refactor: `MapFn`s receive context arg

* feat: add `MapExpand` observable operator

* refactor: `RelayerSessionsManager` to be more reactive

* chore: add godoc comment

* chore: review feedback improvements

* trigger CI
* pokt/main:
  [Relayer] refactor: simplify `RelayerSessionsManager`  (#169)
  [Test] First step for automated E2E Relay test (#167)
* pokt/main:
  [Proxy] chore: Use depinject for relayerProxy (#173)
  [Sessions] chore: Use depinject for sessions mgr construction (#175)
bryanchriswhite and others added 21 commits November 15, 2023 12:47
* relayer/cli:
  fix: supplier client test
  chore: add long command description
  chore: review feedback improvements
  chore: review feedback improvements
  fix: sessiontree store path check
  fix: sessiontree store path check
  refactor: separate tx and query client contexts 🙄
  refactor: relayminer depinject helpers & godoc comments on all constructors
  chore: review feedback improvements
  chore: update anvil service port in make targets
…-update

* merge/e2e_test/relay_x_relayer_cli:
  fix: supplier client test
  chore: add long command description
  chore: review feedback improvements
  chore: review feedback improvements
  fix: sessiontree store path check
  fix: sessiontree store path check
  refactor: separate tx and query client contexts 🙄
  refactor: relayminer depinject helpers & godoc comments on all constructors
  chore: review feedback improvements
  chore: update anvil service port in make targets
Copy link
Member

@Olshansk Olshansk left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

A minor NIT and requires a merge with main but approving pre-emptively!

It's broken on main as is, so we'll fix things afterwards.

e2e/tests/init_test.go Outdated Show resolved Hide resolved
* relayer/cli:
  More tiny comment updates
  Added a couple more comments
  Update some comments and TODOs
  Update the names and references to queryNode/sequencerNode/fullNode etc
  Update pkg/relayer/cmd/cmd.go
  [Test] Updating `relay.feature` to run curl command to enable E2E Relay Test (#178)
  Updated comments for post 177+179 work for okdas
  Update OpenAPI spec
  Update .gitignore
  chore: update comment
  chore: move shared dependency setup logic to shared pkg
  chore: cleanup flags and dependencies for appgateserver cmd
  [Supplier] chore: improve supplier not found error message (#183)
  [CI] Integrate E2E tests with GitHub CI (#152)
…relayer_cli

* pokt/main:
  [LocalNet] Run Relayer and AppGateServer (#179)
  [Relay] E2E Relay Gaps (#177)
…-update

* merge/e2e_test/relay_x_relayer_cli:
  [LocalNet] Run Relayer and AppGateServer (#179)
  [Relay] E2E Relay Gaps (#177)
  More tiny comment updates
  Added a couple more comments
  Update some comments and TODOs
  Update the names and references to queryNode/sequencerNode/fullNode etc
  Update pkg/relayer/cmd/cmd.go
  [Test] Updating `relay.feature` to run curl command to enable E2E Relay Test (#178)
  Updated comments for post 177+179 work for okdas
  Update OpenAPI spec
  Update .gitignore
  chore: update comment
  chore: move shared dependency setup logic to shared pkg
  chore: cleanup flags and dependencies for appgateserver cmd
  [Supplier] chore: improve supplier not found error message (#183)
  [CI] Integrate E2E tests with GitHub CI (#152)
@bryanchriswhite bryanchriswhite changed the base branch from merge/e2e_test/relay_x_relayer_cli to main November 16, 2023 10:01
@bryanchriswhite bryanchriswhite merged commit bfbaa6b into main Nov 16, 2023
8 checks passed
bryanchriswhite added a commit that referenced this pull request Nov 17, 2023
* pokt/main:
  [Relayminer] chore: cleanup after 177 (#190)
  [E2E relay test] Update to #178 (#184)
bryanchriswhite added a commit that referenced this pull request Nov 17, 2023
* pokt/main:
  [Relayminer] chore: cleanup after 177 (#190)
  [E2E relay test] Update to #178 (#184)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
testing Test (or test utils) additions, fixes, improvements or other
Projects
Status: ✅ Done
Development

Successfully merging this pull request may close these issues.

4 participants