use crate::define_tool;
define_tool!(KCAT, {
command: "kcat",
macos: { brew: "kcat" },
linux: {
apt: "kafkacat",
dnf: "kcat",
pacman: "kcat",
apk: "kcat"
},
category: "messaging",
});
#[cfg(test)]
mod tests {
use super::*;
#[test]
fn kcat_registration_shape() {
assert_eq!(KCAT.command, "kcat");
assert_eq!(KCAT.category, Some("messaging"));
let mac = KCAT.macos.expect("kcat must support macOS");
assert_eq!(
mac.brew,
Some("kcat"),
"post-rename formula is `kcat`, not `kafkacat`"
);
let linux = KCAT.linux.expect("kcat must support Linux");
assert_eq!(
linux.apt,
Some("kafkacat"),
"Debian / Ubuntu stable still package as `kafkacat`"
);
assert_eq!(linux.dnf, Some("kcat"));
assert_eq!(linux.pacman, Some("kcat"));
assert_eq!(linux.apk, Some("kcat"));
assert!(KCAT.windows.is_none(), "no first-party winget manifest");
}
}