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] refractor: param update E2E tests as integration tests #826

Merged
merged 121 commits into from
Sep 25, 2024

Conversation

bryanchriswhite
Copy link
Contributor

@bryanchriswhite bryanchriswhite commented Sep 13, 2024

Summary

Ports the MsgUpdateParams and MsgUpdateParam E2E tests to integration tests, improving execution speed and maintainability.

Depends on

Dependents

Issue

Type of change

Select one or more from the following:

Testing

  • Documentation: make docusaurus_start; only needed if you make doc changes
  • Unit Tests: make go_develop_and_test
  • LocalNet E2E Tests: make test_e2e
  • DevNet E2E Tests: Add the devnet-test-e2e label to the PR.

Sanity Checklist

  • I have tested my changes using the available tooling
  • I have commented my code
  • I have performed a self-review of my own code; both comments & source code
  • I create and reference any new tickets, if applicable
  • I have left TODOs throughout the codebase, if applicable

@bryanchriswhite bryanchriswhite added testing Test (or test utils) additions, fixes, improvements or other code health Cleans up some code labels Sep 13, 2024
@bryanchriswhite bryanchriswhite self-assigned this Sep 13, 2024
@bryanchriswhite bryanchriswhite changed the title Issues/799/tests/params [Testing] refractor: param update E2e tests as integration tests Sep 14, 2024
@bryanchriswhite bryanchriswhite linked an issue Sep 16, 2024 that may be closed by this pull request
6 tasks
testutil/integration/suites/update_params.go Show resolved Hide resolved
testutil/integration/suites/update_params.go Show resolved Hide resolved
for _, moduleName := range moduleNames {
msgType := fmt.Sprintf(poktrollMsgTypeFormat, moduleName, msgName)
authorization := &authz.GenericAuthorization{Msg: msgType}
s.RunAuthzGrantMsg(t, granterAddr, granteeAddr, authorization)
Copy link
Member

Choose a reason for hiding this comment

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

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.

@bryanchriswhite Approving this, but please add the necessary TODOs before merging.

@bryanchriswhite bryanchriswhite changed the title [Testing] refractor: param update E2e tests as integration tests [Testing] refractor: param update E2E tests as integration tests Sep 25, 2024
bryanchriswhite added a commit that referenced this pull request Sep 25, 2024
…#827)

## Summary

- Refactor integration app base app construction to eliminate duplicate
DB construction.
- Set default params for all poktroll modules, some were omitted.
- Expose integration app's pre-generated account iterator for use by
integration tests.
- Add faucet account to integration app to consolidate funding mechanics
for integration tests.
- Add authz & bank modules to integration app in preparation for param
update test porting/refactoring as integration tests (#826).
- Add IntegrationAppSuite & base implementation.

## Dependents

- #789
- #826

## Issue

- #799

## Type of change

Select one or more from the following:

- [x] New feature, functionality or library
- [ ] Consensus breaking; add the `consensus-breaking` label if so. See
#791 for details
- [ ] Bug fix
- [x] Code health or cleanup
- [ ] Documentation
- [ ] Other (specify)

## Testing

- [ ] **Documentation**: `make docusaurus_start`; only needed if you
make doc changes
- [ ] **Unit Tests**: `make go_develop_and_test`
- [ ] **LocalNet E2E Tests**: `make test_e2e`
- [ ] **DevNet E2E Tests**: Add the `devnet-test-e2e` label to the PR.

## Sanity Checklist

- [x] I have tested my changes using the available tooling
- [x] I have commented my code
- [x] I have performed a self-review of my own code; both comments &
source code
- [ ] I create and reference any new tickets, if applicable
- [x] I have left TODOs throughout the codebase, if applicable

---------

Co-authored-by: red-0ne <[email protected]>
Co-authored-by: Daniel Olshansky <[email protected]>
…rge/integration-app_x_sup-stake-evts

* issues/799/refactor/integration-app:
  fix: typo
  chore: review feedback improvements
  [Docs][Misc] Add iavl tree diff (#776)
  [Supplier] feat: add supplier un/stake events (#820)
  [Testing] refactor: E2E param test helpers (#821)
… issues/799/tests/params

* issues/799/merge/integration-app_x_sup-stake-evts:
  fix: typo
  chore: review feedback improvements
  [Docs][Misc] Add iavl tree diff (#776)
  [Supplier] feat: add supplier un/stake events (#820)
  [Testing] refactor: E2E param test helpers (#821)

# Conflicts:
#	tests/integration/tokenomics/relay_mining_integration_test.go
* pokt/main:
  [Testing] refactor: integration app / feat: add `IntegrationAppSuite` (#827)
@bryanchriswhite bryanchriswhite changed the base branch from issues/799/merge/integration-app_x_sup-stake-evts to main September 25, 2024 11:57
@bryanchriswhite bryanchriswhite merged commit 2a9d91b into main Sep 25, 2024
13 checks passed
bryanchriswhite added a commit that referenced this pull request Sep 25, 2024
…ansfer-period

* pokt/main:
  [Testing] refractor: param update E2E tests as integration tests (#826)
  [Testing] refactor: integration app / feat: add `IntegrationAppSuite` (#827)
@bryanchriswhite bryanchriswhite deleted the issues/799/tests/params branch September 30, 2024 09:08
bryanchriswhite added a commit that referenced this pull request Oct 4, 2024
## Summary

Adds the `min_stake_gateway` param to the gateway.

## Depends on

- #808 
- #827
- #826

## Issue

- #612

## Type of change

Select one or more from the following:

- [x] New feature, functionality or library
- [x] Consensus breaking; add the `consensus-breaking` label if so. See
#791 for details
- [ ] Bug fix
- [ ] Code health or cleanup
- [ ] Documentation
- [ ] Other (specify)

## Testing

- [x] **Documentation**: `make docusaurus_start`; only needed if you
make doc changes
- [ ] **Unit Tests**: `make go_develop_and_test`
- [ ] **LocalNet E2E Tests**: `make test_e2e`
- [ ] **DevNet E2E Tests**: Add the `devnet-test-e2e` label to the PR.

## Sanity Checklist

- [x] I have tested my changes using the available tooling
- [x] I have commented my code
- [x] I have performed a self-review of my own code; both comments &
source code
- [ ] I create and reference any new tickets, if applicable
- [ ] I have left TODOs throughout the codebase, if applicable

---------

Co-authored-by: Redouane Lakrache <[email protected]>
Co-authored-by: red-0ne <[email protected]>
okdas pushed a commit that referenced this pull request Nov 14, 2024
#815)

## Summary

- Fix non-idempotency in supplier staking tests; `supplier2` was not
staked at the start but was left staked at the end.
- Speed up supplier staking tests by updating the shared params to
minimize the unbonding period to 1 session of 2 localnet/devnet blocks.

### NOTE: This is superseded by #826 where supplier un/staking E2E tests
will be removed.

## Dependents

- #821 
- #820 
- #826

## Issue

- #799

## Type of change

Select one or more from the following:

- [ ] New feature, functionality or library
- [ ] Consensus breaking; add the `consensus-breaking` label if so. See
#791 for details
- [ ] Bug fix
- [x] Code health or cleanup
- [ ] Documentation
- [ ] Other (specify)

## Testing

- [ ] **Documentation**: `make docusaurus_start`; only needed if you
make doc changes
- [ ] **Unit Tests**: `make go_develop_and_test`
- [ ] **LocalNet E2E Tests**: `make test_e2e`
- [ ] **DevNet E2E Tests**: Add the `devnet-test-e2e` label to the PR.

## Sanity Checklist

- [x] I have tested my changes using the available tooling
- [x] I have commented my code
- [ ] I have performed a self-review of my own code; both comments &
source code
- [ ] I create and reference any new tickets, if applicable
- [ ] I have left TODOs throughout the codebase, if applicable

---------

Co-authored-by: Daniel Olshansky <[email protected]>
okdas pushed a commit that referenced this pull request Nov 14, 2024
## Summary

- Rename `paramMap` type to `paramAnyMap` to improve readability and
avoid local variable name collisions
- Add missing parameter update assertion steps
- Refactor event waiting E2E helpers

## Depends on

- #815 

## Dependents

- #820 
- #826

## Issue

Mitigates silently failing parameter update steps.

- #799

## Type of change

Select one or more from the following:

- [ ] New feature, functionality or library
- [ ] Consensus breaking; add the `consensus-breaking` label if so. See
#791 for details
- [ ] Bug fix
- [x] Code health or cleanup
- [ ] Documentation
- [ ] Other (specify)

## Testing

- [ ] **Documentation**: `make docusaurus_start`; only needed if you
make doc changes
- [ ] **Unit Tests**: `make go_develop_and_test`
- [ ] **LocalNet E2E Tests**: `make test_e2e`
- [ ] **DevNet E2E Tests**: Add the `devnet-test-e2e` label to the PR.

## Sanity Checklist

- [ ] I have tested my changes using the available tooling
- [x] I have commented my code
- [x] I have performed a self-review of my own code; both comments &
source code
- [ ] I create and reference any new tickets, if applicable
- [ ] I have left TODOs throughout the codebase, if applicable

---------

Co-authored-by: Daniel Olshansky <[email protected]>
okdas pushed a commit that referenced this pull request Nov 14, 2024
## Summary

Adds the following events:
- `EventSupplierStaked`
- `EventSupplierUnbondingBegin`
- `EventSupplierUnbondingEnd`

## Depends on

- #815 

## Dependents

- #826

## Issue

Results in more robust supplier.feature steps.

- #799

## Type of change

Select one or more from the following:

- [x] New feature, functionality or library
- [ ] Consensus breaking; add the `consensus-breaking` label if so. See
#791 for details
- [ ] Bug fix
- [x] Code health or cleanup
- [ ] Documentation
- [ ] Other (specify)

## Testing

- [ ] **Documentation**: `make docusaurus_start`; only needed if you
make doc changes
- [ ] **Unit Tests**: `make go_develop_and_test`
- [ ] **LocalNet E2E Tests**: `make test_e2e`
- [ ] **DevNet E2E Tests**: Add the `devnet-test-e2e` label to the PR.

## Sanity Checklist

- [x] I have tested my changes using the available tooling
- [x] I have commented my code
- [x] I have performed a self-review of my own code; both comments &
source code
- [ ] I create and reference any new tickets, if applicable
- [ ] I have left TODOs throughout the codebase, if applicable

---------

Co-authored-by: Daniel Olshansky <[email protected]>
Co-authored-by: red-0ne <[email protected]>
okdas pushed a commit that referenced this pull request Nov 14, 2024
…#827)

## Summary

- Refactor integration app base app construction to eliminate duplicate
DB construction.
- Set default params for all poktroll modules, some were omitted.
- Expose integration app's pre-generated account iterator for use by
integration tests.
- Add faucet account to integration app to consolidate funding mechanics
for integration tests.
- Add authz & bank modules to integration app in preparation for param
update test porting/refactoring as integration tests (#826).
- Add IntegrationAppSuite & base implementation.

## Dependents

- #789
- #826

## Issue

- #799

## Type of change

Select one or more from the following:

- [x] New feature, functionality or library
- [ ] Consensus breaking; add the `consensus-breaking` label if so. See
#791 for details
- [ ] Bug fix
- [x] Code health or cleanup
- [ ] Documentation
- [ ] Other (specify)

## Testing

- [ ] **Documentation**: `make docusaurus_start`; only needed if you
make doc changes
- [ ] **Unit Tests**: `make go_develop_and_test`
- [ ] **LocalNet E2E Tests**: `make test_e2e`
- [ ] **DevNet E2E Tests**: Add the `devnet-test-e2e` label to the PR.

## Sanity Checklist

- [x] I have tested my changes using the available tooling
- [x] I have commented my code
- [x] I have performed a self-review of my own code; both comments &
source code
- [ ] I create and reference any new tickets, if applicable
- [x] I have left TODOs throughout the codebase, if applicable

---------

Co-authored-by: red-0ne <[email protected]>
Co-authored-by: Daniel Olshansky <[email protected]>
okdas pushed a commit that referenced this pull request Nov 14, 2024
## Summary

Ports the `MsgUpdateParams` and `MsgUpdateParam` E2E tests to
integration tests, improving execution speed and maintainability.

## Depends on

- #827 
- #820 
- #821
- #815

## Dependents

- #809 

## Issue

- #799

## Type of change

Select one or more from the following:

- [ ] New feature, functionality or library
- [ ] Consensus breaking; add the `consensus-breaking` label if so. See
#791 for details
- [ ] Bug fix
- [x] Code health or cleanup
- [ ] Documentation
- [ ] Other (specify)

## Testing

- [x] **Documentation**: `make docusaurus_start`; only needed if you
make doc changes
- [ ] **Unit Tests**: `make go_develop_and_test`
- [ ] **LocalNet E2E Tests**: `make test_e2e`
- [x] **DevNet E2E Tests**: Add the `devnet-test-e2e` label to the PR.

## Sanity Checklist

- [x] I have tested my changes using the available tooling
- [x] I have commented my code
- [x] I have performed a self-review of my own code; both comments &
source code
- [x] I create and reference any new tickets, if applicable
- [x] I have left TODOs throughout the codebase, if applicable

---------

Co-authored-by: Daniel Olshansky <[email protected]>
Co-authored-by: red-0ne <[email protected]>
okdas pushed a commit that referenced this pull request Nov 14, 2024
## Summary

Adds the `min_stake_gateway` param to the gateway.

## Depends on

- #808 
- #827
- #826

## Issue

- #612

## Type of change

Select one or more from the following:

- [x] New feature, functionality or library
- [x] Consensus breaking; add the `consensus-breaking` label if so. See
#791 for details
- [ ] Bug fix
- [ ] Code health or cleanup
- [ ] Documentation
- [ ] Other (specify)

## Testing

- [x] **Documentation**: `make docusaurus_start`; only needed if you
make doc changes
- [ ] **Unit Tests**: `make go_develop_and_test`
- [ ] **LocalNet E2E Tests**: `make test_e2e`
- [ ] **DevNet E2E Tests**: Add the `devnet-test-e2e` label to the PR.

## Sanity Checklist

- [x] I have tested my changes using the available tooling
- [x] I have commented my code
- [x] I have performed a self-review of my own code; both comments &
source code
- [ ] I create and reference any new tickets, if applicable
- [ ] I have left TODOs throughout the codebase, if applicable

---------

Co-authored-by: Redouane Lakrache <[email protected]>
Co-authored-by: red-0ne <[email protected]>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
code health Cleans up some code devnet devnet-test-e2e push-image CI related - pushes images to ghcr.io testing Test (or test utils) additions, fixes, improvements or other
Projects
Status: ✅ Done
Development

Successfully merging this pull request may close these issues.

[Testing] E2E Test Refactoring
2 participants