diff --git a/harmony/src/domain/score.rs b/harmony/src/domain/score.rs index 216fb23..0dac87b 100644 --- a/harmony/src/domain/score.rs +++ b/harmony/src/domain/score.rs @@ -218,7 +218,7 @@ where mod tests { use super::*; use crate::modules::dns::DnsScore; - use crate::topology::{self, HAClusterTopology}; + use crate::topology::HAClusterTopology; #[test] fn test_format_values_as_string() { diff --git a/harmony/src/domain/topology/k8s_anywhere.rs b/harmony/src/domain/topology/k8s_anywhere.rs index 79beca5..18a2ccc 100644 --- a/harmony/src/domain/topology/k8s_anywhere.rs +++ b/harmony/src/domain/topology/k8s_anywhere.rs @@ -151,22 +151,20 @@ impl Topology for K8sAnywhereTopology { } async fn ensure_ready(&self) -> Result { - let k8s_state = self + let k8s_state = self .k8s_state .get_or_try_init(|| self.try_get_or_install_k8s_client()) .await?; - let k8s_state: &K8sState = k8s_state - .as_ref() - .ok_or(InterpretError::new( - "No K8s client could be found or installed".to_string(), - ))?; - + let k8s_state: &K8sState = k8s_state.as_ref().ok_or(InterpretError::new( + "No K8s client could be found or installed".to_string(), + ))?; + match self.is_helm_available() { Ok(()) => Ok(Outcome::success(format!( - "{} + helm available", - k8s_state.message.clone() - ))), + "{} + helm available", + k8s_state.message.clone() + ))), Err(_) => Err(InterpretError::new("helm unavailable".to_string())), } } diff --git a/harmony_cli/src/lib.rs b/harmony_cli/src/lib.rs index 9ecb8fc..47d3aff 100644 --- a/harmony_cli/src/lib.rs +++ b/harmony_cli/src/lib.rs @@ -147,7 +147,6 @@ mod test { modules::dummy::{ErrorScore, PanicScore, SuccessScore}, topology::HAClusterTopology, }; - use harmony::{score::Score, topology::Topology}; fn init_test_maestro() -> Maestro { let inventory = Inventory::autoload(); diff --git a/private_repos/example/Cargo.toml b/private_repos/example/Cargo.toml index f5aa56f..69b6c72 100644 --- a/private_repos/example/Cargo.toml +++ b/private_repos/example/Cargo.toml @@ -1,2 +1,3 @@ [package] name = "example" +edition = "2024"