2024-03-31 15:02:21 +00:00
|
|
|
mod error;
|
|
|
|
mod session;
|
|
|
|
|
|
|
|
pub use session::Session;
|
2024-03-31 10:13:56 +00:00
|
|
|
|
|
|
|
#[cfg(test)]
|
|
|
|
mod tests {
|
|
|
|
use super::*;
|
|
|
|
|
2024-03-31 15:02:21 +00:00
|
|
|
#[tokio::test]
|
|
|
|
async fn authorized_session() {
|
|
|
|
let host = std::env::var("ICRC_TEST_HOST")
|
|
|
|
.expect("The environment variable ICRC_TEST_HOST needs to be set!");
|
|
|
|
let token = std::env::var("ICRC_TEST_AUTH")
|
|
|
|
.expect("The environment variable ICRC_TEST_AUTH needs to be set!");
|
|
|
|
|
|
|
|
let session = Session::new(&host, Some(token)).await.unwrap();
|
|
|
|
|
|
|
|
// assert_eq!(result, 4);
|
2024-03-31 10:13:56 +00:00
|
|
|
}
|
|
|
|
}
|