From d421ee950155ca19dea9ed828e556a08165eccb9 Mon Sep 17 00:00:00 2001 From: Ashok Menon Date: Wed, 12 Feb 2025 19:58:11 +0000 Subject: [PATCH] fixup: name service use tokio::test instead of sim_test ...it seems to not work. --- Cargo.lock | 1 - crates/sui-indexer-alt-e2e-tests/Cargo.toml | 1 - .../tests/name_service_tests.rs | 19 +++++++++---------- 3 files changed, 9 insertions(+), 12 deletions(-) diff --git a/Cargo.lock b/Cargo.lock index 361a8b92a6de02..a14a179a080c06 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -14116,7 +14116,6 @@ dependencies = [ "sui-indexer-alt", "sui-indexer-alt-framework", "sui-indexer-alt-jsonrpc", - "sui-macros", "sui-move-build", "sui-pg-db", "sui-transactional-test-runner", diff --git a/crates/sui-indexer-alt-e2e-tests/Cargo.toml b/crates/sui-indexer-alt-e2e-tests/Cargo.toml index 7ad7af8fa33233..997f9bbe77b114 100644 --- a/crates/sui-indexer-alt-e2e-tests/Cargo.toml +++ b/crates/sui-indexer-alt-e2e-tests/Cargo.toml @@ -43,6 +43,5 @@ telemetry-subscribers.workspace = true move-core-types.workspace = true -sui-macros.workspace = true sui-move-build.workspace = true sui-transactional-test-runner.workspace = true diff --git a/crates/sui-indexer-alt-e2e-tests/tests/name_service_tests.rs b/crates/sui-indexer-alt-e2e-tests/tests/name_service_tests.rs index 036a3a3d3cd74f..88d51ceb1b80ba 100644 --- a/crates/sui-indexer-alt-e2e-tests/tests/name_service_tests.rs +++ b/crates/sui-indexer-alt-e2e-tests/tests/name_service_tests.rs @@ -16,7 +16,6 @@ use sui_indexer_alt_jsonrpc::{ config::{NameServiceConfig, RpcConfig}, data::system_package_task::SystemPackageTaskArgs, }; -use sui_macros::sim_test; use sui_move_build::BuildConfig; use sui_types::{ base_types::{ObjectID, SuiAddress}, @@ -67,7 +66,7 @@ macro_rules! assert_invalid_params { } /// Test resolving a simple domain name, using both formats. -#[sim_test] +#[tokio::test] async fn test_resolve_domain() { let mut c = SuiNSCluster::new().await; @@ -86,7 +85,7 @@ async fn test_resolve_domain() { } /// If a domain name exists but has no target, we can't resolve it, but it's not an error. -#[sim_test] +#[tokio::test] async fn test_resolve_domain_no_target() { let mut c = SuiNSCluster::new().await; @@ -106,7 +105,7 @@ async fn test_resolve_domain_no_target() { /// Set-up a domain with an expiry, and confirm that it exists, then advance time on-chain until it /// expires and confirm that the RPC no longer resolves the domain. -#[sim_test] +#[tokio::test] async fn test_resolve_domain_expiry() { let mut c = SuiNSCluster::new().await; @@ -130,7 +129,7 @@ async fn test_resolve_domain_expiry() { c.cluster.stopped().await; } -#[sim_test] +#[tokio::test] async fn test_resolve_nonexistent_domain() { let mut c = SuiNSCluster::new().await; c.cluster.create_checkpoint().await.unwrap(); @@ -142,7 +141,7 @@ async fn test_resolve_nonexistent_domain() { /// Test resolving a valid sub-domain (which requires both the sub-domain and its parent to exist /// in the registry). -#[sim_test] +#[tokio::test] async fn test_resolve_subdomain() { let mut c = SuiNSCluster::new().await; @@ -166,7 +165,7 @@ async fn test_resolve_subdomain() { } /// Like the parent domain case, but a sub-domain's expiry is controlled by its parent's expiry -#[sim_test] +#[tokio::test] async fn test_resolve_subdomain_parent_expiry() { let mut c = SuiNSCluster::new().await; @@ -195,7 +194,7 @@ async fn test_resolve_subdomain_parent_expiry() { } /// A sub-domain that has its own expiry, in addition to (and before) the parent's expiry. -#[sim_test] +#[tokio::test] async fn test_resolve_subdomain_expiry() { let mut c = SuiNSCluster::new().await; @@ -227,7 +226,7 @@ async fn test_resolve_subdomain_expiry() { /// A sub-domain where the parent domain's NFT is different from the sub-domain's NFT, is /// considered expired -- its parent has been bought by someone else. -#[sim_test] +#[tokio::test] async fn test_resolve_subdomain_bad_parent() { let mut c = SuiNSCluster::new().await; @@ -253,7 +252,7 @@ async fn test_resolve_subdomain_bad_parent() { } /// The parent domain record does not exist, so the sub-domain is considered expired. -#[sim_test] +#[tokio::test] async fn test_resolve_subdomain_no_parent() { let mut c = SuiNSCluster::new().await;