chore: stop sharing a cache with the binary the audit job runs

This commit is contained in:
2026-09-09 12:05:11 +00:00
parent b6a6750499
commit 462d9cbec2
5 changed files with 93 additions and 11 deletions

View File

@@ -27,15 +27,24 @@ fn script(shell: Shell) -> Vec<u8> {
#[cfg(test)]
mod tests {
use super::{Shell, script};
use clap::ValueEnum;
use super::{Ahab, Shell, script};
use clap::{CommandFactory, ValueEnum};
#[test]
fn every_shell_gets_a_script_covering_the_subcommands() {
// asked of the parser rather than listed here, which is a list that
// silently stops covering the newest command
let subcommands: Vec<String> = Ahab::command()
.get_subcommands()
.map(|sub| sub.get_name().to_string())
.collect();
assert!(subcommands.len() > 1, "{subcommands:?}");
for shell in Shell::value_variants() {
let out = String::from_utf8(script(*shell)).expect("script is utf8");
for subcommand in ["django", "postgres", "link", "completions"] {
for subcommand in &subcommands {
assert!(
out.contains(subcommand),
"{shell:?} script never mentions {subcommand}"