File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -43,15 +43,10 @@ func TestCommandUnknownSubcommandFailsLoudly(t *testing.T) {
4343 }
4444}
4545
46- // TestCommandUnknownSubcommandReportedFromAudit reproduces the exact repro
47- // from the production audit: an AI-SRE session guessed "incident
48- // list-alerts" instead of the real "incident alerts" subcommand. The typo is
49- // too far (by both edit-distance and prefix) from any real subcommand name
50- // for cobra's SuggestionsFor to produce a match, so this only asserts the
51- // core fix — non-zero exit, clearly-labeled unknown command — not a
52- // suggestion. See TestCommandUnknownSubcommandFailsLoudly for the
53- // suggestion-bearing case.
54- func TestCommandUnknownSubcommandReportedFromAudit (t * testing.T ) {
46+ // TestCommandUnknownSubcommandWithoutSuggestionFails verifies that an unknown
47+ // subcommand still returns an error when it is too far from every real
48+ // subcommand for cobra to suggest a match.
49+ func TestCommandUnknownSubcommandWithoutSuggestionFails (t * testing.T ) {
5550 saveAndResetGlobals (t )
5651
5752 _ , err := execCommand ("incident" , "list-alerts" )
You can’t perform that action at this time.
0 commit comments