-
Notifications
You must be signed in to change notification settings - Fork 41
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
add some node api participation tests
- Loading branch information
Showing
3 changed files
with
57 additions
and
2 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -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) | ||
Check failure on line 46 in sdk/tests/client/node_api/participation.rs GitHub Actions / crate (ubuntu-latest)
Check failure on line 46 in sdk/tests/client/node_api/participation.rs GitHub Actions / crate (windows-latest)
Check failure on line 46 in sdk/tests/client/node_api/participation.rs GitHub Actions / crate (ubuntu-latest)
|
||
} | ||
} |