style: format proxmox client code with cargo fmt
Some checks failed
PR Review Automation / review (pull_request) Has been cancelled
Test / frontend-tests (pull_request) Successful in 1m46s
Test / frontend-typecheck (pull_request) Successful in 1m53s
Test / rust-fmt-check (pull_request) Successful in 12m1s
Test / rust-clippy (pull_request) Successful in 13m25s
Test / rust-tests (pull_request) Successful in 15m37s

This commit is contained in:
Shaun Arman 2026-06-20 21:56:49 -05:00
parent cec962b349
commit bad3042d2d

View File

@ -458,7 +458,10 @@ mod tests {
};
let mut client = ProxmoxClient::new("172.0.0.18", 8006, "root@pam");
client.authenticate(&password).await.expect("Authentication failed");
client
.authenticate(&password)
.await
.expect("Authentication failed");
#[derive(serde::Deserialize, Debug)]
struct Resource {
@ -470,7 +473,9 @@ mod tests {
status: Option<String>,
}
let result: Result<Vec<Resource>, _> = client.get("cluster/resources", client.ticket.as_deref()).await;
let result: Result<Vec<Resource>, _> = client
.get("cluster/resources", client.ticket.as_deref())
.await;
match result {
Ok(resources) => {
println!("✓ Cluster resources fetched successfully");
@ -498,7 +503,10 @@ mod tests {
};
let mut client = ProxmoxClient::new("proxmox-server", 8006, "root@pam");
client.authenticate(&password).await.expect("Authentication failed");
client
.authenticate(&password)
.await
.expect("Authentication failed");
#[derive(serde::Deserialize, Debug)]
struct Node {
@ -537,7 +545,10 @@ mod tests {
};
let mut client = ProxmoxClient::new("proxmox-server", 8006, "root@pam");
client.authenticate(&password).await.expect("Authentication failed");
client
.authenticate(&password)
.await
.expect("Authentication failed");
#[derive(serde::Deserialize, Debug)]
struct Resource {
@ -548,10 +559,15 @@ mod tests {
status: Option<String>,
}
let result: Result<Vec<Resource>, _> = client.get("cluster/resources", client.ticket.as_deref()).await;
let result: Result<Vec<Resource>, _> = client
.get("cluster/resources", client.ticket.as_deref())
.await;
match result {
Ok(resources) => {
let vms: Vec<_> = resources.into_iter().filter(|r| r.r#type.as_deref() == Some("qemu")).collect();
let vms: Vec<_> = resources
.into_iter()
.filter(|r| r.r#type.as_deref() == Some("qemu"))
.collect();
println!("✓ VMs fetched successfully");
println!(" Found {} VMs", vms.len());
}