2022-04-18 14:24:38 +00:00
|
|
|
use mikrotik::{Client, ClientError};
|
2022-04-17 15:30:12 +00:00
|
|
|
use reqwest::Url;
|
|
|
|
|
|
|
|
#[tokio::test]
|
2022-04-18 14:24:38 +00:00
|
|
|
async fn health() -> Result<(), ClientError> {
|
2022-04-17 15:30:12 +00:00
|
|
|
let base = Url::parse("https://10.0.10.1")?;
|
2022-04-17 20:03:01 +00:00
|
|
|
let mut client = Client::new(base, "admin".to_string(), "ifd783far".to_string(), true)
|
|
|
|
.expect("error in creating client");
|
2022-04-17 15:30:12 +00:00
|
|
|
|
|
|
|
let response = mikrotik::system::health(&mut client).await?;
|
|
|
|
|
|
|
|
println!("{:?}", response);
|
|
|
|
|
|
|
|
Ok(())
|
|
|
|
}
|