diff --git a/sdk/tests/client/node_api/core.rs b/sdk/tests/client/node_api/core.rs index c7e7cb629e..7691732fde 100644 --- a/sdk/tests/client/node_api/core.rs +++ b/sdk/tests/client/node_api/core.rs @@ -121,10 +121,16 @@ async fn test_get_address_outputs() { let r = client.get_outputs(&output_ids_response.items).await.unwrap(); println!("{r:#?}"); - let r = client.get_outputs_ignore_errors(&output_ids_response.items).await.unwrap(); + let r = client + .get_outputs_ignore_errors(&output_ids_response.items) + .await + .unwrap(); println!("{r:#?}"); - let r = client.get_outputs_metadata_ignore_errors(&output_ids_response.items).await.unwrap(); + let r = client + .get_outputs_metadata_ignore_errors(&output_ids_response.items) + .await + .unwrap(); println!("{r:#?}"); } diff --git a/sdk/tests/client/node_api/mod.rs b/sdk/tests/client/node_api/mod.rs index be4bc67a5e..6ece350f51 100644 --- a/sdk/tests/client/node_api/mod.rs +++ b/sdk/tests/client/node_api/mod.rs @@ -5,6 +5,7 @@ mod core; mod indexer; #[cfg(feature = "mqtt")] mod mqtt; +mod participation; use iota_sdk::{ client::{ diff --git a/sdk/tests/client/node_api/participation.rs b/sdk/tests/client/node_api/participation.rs new file mode 100644 index 0000000000..0e568f9012 --- /dev/null +++ b/sdk/tests/client/node_api/participation.rs @@ -0,0 +1,48 @@ +// Copyright 2023 IOTA Stiftung +// SPDX-License-Identifier: Apache-2.0 + +use iota_sdk::types::api::plugins::participation::types::ParticipationEventType; + +use crate::client::common::setup_client_with_node_health_ignored; + +#[ignore] +#[tokio::test] +async fn test_get_all_events() { + let client = setup_client_with_node_health_ignored().await; + let response = client.events(None).await.unwrap(); + + for event_id in response.event_ids.iter() { + let event = client.event(event_id).await.unwrap(); + println!("{:?}", event); + let status = client.event_status(event_id, None).await.unwrap(); + println!("{:?}", status); + } +} + +#[ignore] +#[tokio::test] +async fn test_get_voting_events() { + let client = setup_client_with_node_health_ignored().await; + let response = client.events(Some(ParticipationEventType::Voting)).await.unwrap(); + for event_id in response.event_ids.iter() { + let event = client.event(event_id).await.unwrap(); + println!("{:?}", event); + let status = client.event_status(event_id, None).await.unwrap(); + println!("{:?}", status); + } +} + +#[ignore] +#[tokio::test] +async fn test_get_staking_events() { + let client = setup_client_with_node_health_ignored().await; + let response = client.events(Some(ParticipationEventType::Staking)).await.unwrap(); + for event_id in response.event_ids.iter() { + let event = client.event(event_id).await.unwrap(); + println!("{:?}", event); + let status = client.event_status(event_id, None).await.unwrap(); + println!("{:?}", status); + + client.address_staking_status(bech32_address) + } +}