watasu 0.1.13

Rust SDK for Watasu
Documentation
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
use watasu::{Sandbox, SnapshotListOptions};

#[tokio::test]
async fn live_snapshot_list_shape() {
    if std::env::var("WATASU_LIVE_API_TESTS").ok().as_deref() != Some("1") {
        eprintln!("set WATASU_LIVE_API_TESTS=1 to run live API smoke tests");
        return;
    }

    let page = Sandbox::list_snapshots_page(SnapshotListOptions {
        limit: Some(2),
        ..SnapshotListOptions::default()
    })
    .await
    .expect("live snapshot list request should succeed");

    assert!(page.snapshots.len() <= 2);
}