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

[iota-indexer]: merge rpc-tests branch into develop #3842

Merged
merged 27 commits into from
Nov 7, 2024

Conversation

sergiupopescu199
Copy link
Contributor

@sergiupopescu199 sergiupopescu199 commented Oct 31, 2024

Description of change

Merge the feature branch sc-platform/indexer-new-rpc-tests into develop branch

Links to any relevant issues

#3813

Type of change

  • Enhancement (a non-breaking change which adds functionality)

How the change has been tested

# run tests requiring only postgres integration
cargo nextest run -p iota-indexer --features pg_integration --test-threads 1

# run rpc tests with shared runtime
cargo test --profile simulator -p iota-indexer --features shared_test_runtime

Change checklist

  • I have followed the contribution guidelines for this project
  • I have performed a self-review of my own code

sergiupopescu199 and others added 17 commits September 23, 2024 09:08
* feat(iota-indexer): add read_api rpc tests

* fixup! feat(iota-indexer): add read_api rpc tests

* fix(iota-indexer): respect show_raw_effects option

* fix(iota-json-rpc): respect show_raw_effects option

* fix(iota-indexer): add an assertion to test node rpc options

* refactor(iota-indexer): handle options in a more idiomatic way

* fixup! refactor(iota-indexer): handle options in a more idiomatic way

* fix(iota-indexer): Fix README

* fix(iota-indexer): add serial_test for all test cases

refactor(iota-indexer): add common module for tests

* fixup! fix(iota-indexer): add serial_test for all test cases

* fixup! fix(iota-indexer): add serial_test for all test cases

* fixup! fixup! fix(iota-indexer): add serial_test for all test cases

* fixup! fixup! fixup! fix(iota-indexer): add serial_test for all test cases

* fixup! fixup! fixup! fixup! fix(iota-indexer): add serial_test for all test cases
* feat(iota-indexer): Extended api tests for iota-indexer

* Rustfmt, removed unused imports, small cleanups

* Remove underscore prefixes from function names

* Add reason for tests to be ignored

* Simplify `add_test_epochs_to_simulacrum`

* Remove test_ prefixes from the tests

* Update ignore reasons for metrics tests

* Do not use pattern matching in asserts

* Make test data preparation more verbose
* feat(iota-indexer): add test for indexer_api

* fix(iota-indexer): improve tests

* fixup! fix(iota-indexer): improve tests
* refactor(iota-indexer): explore two impl options for read_api tests

* feat(iota-indexer): provide an alternative fn that hides the runtime invoking it under the hood

* Revert "feat(iota-indexer): provide an alternative fn that hides the runtime invoking it under the hood"

This reverts commit 3a5c9c9.

* fix(iota-indexer): improve the code

* feat(iota-indexer): use shared cluster approach and add feature gate

* fixup! fix(iota-indexer): improve the code

* fixup! fixup! fix(iota-indexer): improve the code
…or tests (#2964)

* fix(iota-indexer): refactor indexer_api to use shared runtime in tests

* fixup! fix(iota-indexer): refactor indexer_api to use shared runtime in tests
* feat(iota-indexer): add write_api tests

* fixup! feat(iota-indexer): add write_api tests

* fixup! fixup! feat(iota-indexer): add write_api tests

* fixup! fixup! fixup! feat(iota-indexer): add write_api tests

* fixup! fixup! fixup! fixup! feat(iota-indexer): add write_api tests
# Conflicts:
#	Cargo.lock
#	crates/iota-indexer/Cargo.toml
#	crates/iota-indexer/README.md
#	crates/iota-indexer/src/models/transactions.rs
#	crates/iota-indexer/tests/ingestion_tests.rs
* feat(iota-indexer): add move_utils tests

* fixup! Merge branch 'sc-platform/indexer-new-rpc-tests' into sc-platform/issue-2200

* fixup! fixup! Merge branch 'sc-platform/indexer-new-rpc-tests' into sc-platform/issue-2200

* fixup! fixup! fixup! Merge branch 'sc-platform/indexer-new-rpc-tests' into sc-platform/issue-2200

* fix(iota-indexer): fix move_utils tests
* fix: add indexer indexer-api tests

* refactor: simplify Faucet type

* refactor: Add dynamic field tests

* refactor: pass gas object

* refactor: add iota-test-transaction-builder to dev-deps

* refactor: fix merge conflicts

* refactor: fix fmt

* refactor: remove dev dep

* refactor: fix fmt

* refactor: fix clippy

* refactor: remove refs
* refactor: Rebase Governance API tests

* feat: Implement simple test cases

* refactor: Fmt

* refactor: Assert system state summary; assert reference gas price

* refactor: Try add timelocked stakes to the cluster

* fix: add timelocked staking test

* fix: add timelocked unstaking test

* refactor: wait for transaction in timelocked tests

* refactor: fix clippy

* refactor: fix clippy

* refactor: fix clippy

* refactor: remove test that is not in feature base branch

* refactor: fix fmt

* refactor: fix fmt

* refactor: use dedicated keypair for timelocked staking tests
* refactor: use dedicated keypairs and consider epoch progression from other tests

* refactor: remove unnecessary gas_price * 2
…ed test cluster (#3018)

* feat(iota-indexer): Refactor ExtendedApi tests in indexer to use shared test cluster

* Reuse function for finding available port/socket

* Get rid of the `replace_db_name` function

* Use &str instad of String for database_name where possible

* Remove SimulacrumApiTestEnvDefinition type, rename InitializedSimulacrumEnv type

* Fixes after rebase on recent feature branch

* Update README to run tests with `--test-threads 1`
* feat(iota-indexer): Add tests for CoinApi

* Simplify `once_prepare_addr_with_iota_and_custom_coins`, reorder modules in main.rs

* Fixes after rebase

* Change return type of `once_prepare_addr_with_iota_and_custom_coins`

* Rename helper test functions

* Fix clippy

* Fix clippy
@sergiupopescu199 sergiupopescu199 added sc-platform Issues related to the Smart Contract Platform group. infrastructure Issues related to the Infrastructure Team labels Oct 31, 2024
@sergiupopescu199 sergiupopescu199 linked an issue Oct 31, 2024 that may be closed by this pull request
@sergiupopescu199 sergiupopescu199 marked this pull request as ready for review November 1, 2024 08:15
sergiupopescu199 and others added 2 commits November 5, 2024 13:13
Co-authored-by: Thoralf-M <46689931+Thoralf-M@users.noreply.github.com>
Co-authored-by: Thoralf-M <46689931+Thoralf-M@users.noreply.github.com>
@Thoralf-M
Copy link
Member

Seems like something in this PR caused these tests to fail (they fail in the runs for multiple commits here and haven't seen them fail in other PRs)

  TRY 2 FAIL [   2.107s] iota-e2e-tests::traffic_control_tests test_validator_traffic_control_dry_run
  TRY 2 FAIL [   2.937s] iota-e2e-tests::traffic_control_tests test_validator_traffic_control_error_blocked
  TRY 2 FAIL [   3.001s] iota-e2e-tests::traffic_control_tests test_validator_traffic_control_error_delegated
  TRY 2 FAIL [   3.183s] iota-e2e-tests::traffic_control_tests test_validator_traffic_control_noop
  TRY 2 FAIL [   2.504s] iota-e2e-tests::traffic_control_tests test_validator_traffic_control_ok

@samuel-rufi
Copy link
Member

samuel-rufi commented Nov 6, 2024

@Thoralf-M good catch, following PR solves the failing test cases #3931
See #3930 for more info.

…etworkConfig` provided (#3931)

* fix: Don't add a faucet account if the `TestCluster` was built using a `NetworkConfig`

* fix: Improve comment

* fix: Improve comment

* fix: Fmt

* fix: Clippy

* fix: remove if else
@sergiupopescu199 sergiupopescu199 merged commit bfc8a32 into develop Nov 7, 2024
38 of 40 checks passed
@sergiupopescu199 sergiupopescu199 deleted the sc-platform/indexer-new-rpc-tests branch November 7, 2024 11:33
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
infrastructure Issues related to the Infrastructure Team sc-platform Issues related to the Smart Contract Platform group.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

[iota-indexer]: merge rpc-tests branch into develop
7 participants