Skip to content

Commit

Permalink
fixup: name service use tokio::test instead of sim_test
Browse files Browse the repository at this point in the history
...it seems to not work.
  • Loading branch information
amnn committed Feb 12, 2025
1 parent d654796 commit 8460dfb
Show file tree
Hide file tree
Showing 3 changed files with 9 additions and 12 deletions.
1 change: 0 additions & 1 deletion Cargo.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

1 change: 0 additions & 1 deletion crates/sui-indexer-alt-e2e-tests/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -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
19 changes: 9 additions & 10 deletions crates/sui-indexer-alt-e2e-tests/tests/name_service_tests.rs
Original file line number Diff line number Diff line change
Expand Up @@ -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},
Expand Down Expand Up @@ -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;

Expand All @@ -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;

Expand All @@ -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;

Expand All @@ -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();
Expand All @@ -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;

Expand All @@ -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;

Expand Down Expand Up @@ -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;

Expand Down Expand Up @@ -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;

Expand All @@ -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;

Expand Down

0 comments on commit 8460dfb

Please sign in to comment.