#![cfg(feature = "kube")]
mod cluster {
mod release;
mod store;
use std::path::PathBuf;
use kube::config::Kubeconfig;
pub(crate) fn require_kind() -> PathBuf {
let path = std::env::var_os("KUBECONFIG")
.and_then(|paths| std::env::split_paths(&paths).next())
.expect("KUBECONFIG must point at the kind cluster's kubeconfig");
let context = Kubeconfig::read()
.expect("kubeconfig")
.current_context
.unwrap_or_default();
assert!(
context.starts_with("kind-"),
"the cluster tests only run against kind, but the current context is {context:?}"
);
path
}
}