hotdata 0.17.0

Powerful data platform API for datasets, queries, and analytics.
Documentation
//! Scenario: connections_read.
//!
//! Read-only lifecycle ops on the seeded connection — get and list. Does not
//! create or delete connections in prod (would require real datastore
//! credentials in CI secrets). purge_connection_cache, once exercised here,
//! has been removed from the API.

mod common;

use hotdata::apis::connections_api;

// Disabled in the rust SDK: connections are being retired, and the seeded
// prod connection's health check currently returns an internal server error.
// The file is kept so scenario-parity still finds a matching test.
#[ignore = "connections being retired; seeded connection health unstable in prod"]
#[tokio::test]
async fn connections_read() {
    let (client, connection_id) = skip_if_no_connection!();
    let config = client.configuration();

    let detail = connections_api::get_connection(config, &connection_id)
        .await
        .expect("get_connection should succeed");
    assert_eq!(detail.id, connection_id);
    assert!(!detail.source_type.is_empty(), "expected a source_type");
    assert!(!detail.name.is_empty(), "expected a connection name");

    let listing = connections_api::list_connections(config)
        .await
        .expect("list_connections should succeed");
    assert!(
        listing.connections.iter().any(|c| c.id == connection_id),
        "seeded connection {connection_id} not in list_connections"
    );
}