chore: stop sharing a cache with the binary the audit job runs
This commit is contained in:
@@ -9,7 +9,7 @@ pub enum Django {
|
||||
/// Start a bash session in a fresh django container
|
||||
Bash,
|
||||
|
||||
/// Prepare empty management command 'command' in app 'app'
|
||||
/// Prepare an empty management command NAME in the app at APP
|
||||
MakeCommand { app: PathBuf, name: String },
|
||||
|
||||
/// Run Django's manage.py makemigrations
|
||||
|
||||
@@ -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}"
|
||||
|
||||
Reference in New Issue
Block a user