test: add e2e test suite and fix namespace/mention/assignee flags

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
This commit is contained in:
2026-03-31 22:36:49 +02:00
parent 8d831d131b
commit 4404518f50
7 changed files with 794 additions and 177 deletions

View File

@@ -22,11 +22,12 @@ var aliasCmd = &cobra.Command{
return
}
if len(args) == 1 {
if a, err := cfg.GetAlias(args[0]); err != nil {
a, err := cfg.GetAlias(args[0])
if err != nil {
fmt.Fprintln(os.Stderr, "alias not found:", args[0])
} else {
fmt.Println(a.Command)
os.Exit(1)
}
fmt.Println(a.Command)
return
}
if err := cfg.SetAlias(&service.Alias{Name: args[0], Command: args[1], Description: aliasDesc}); err != nil {
@@ -42,9 +43,9 @@ var aliasDelCmd = &cobra.Command{
Run: func(cmd *cobra.Command, args []string) {
if err := cfg.DeleteAlias(args[0]); err != nil {
fmt.Fprintln(os.Stderr, err)
} else {
output.PrintAction(cmd.OutOrStdout(), "Alias deleted", args[0], false)
os.Exit(1)
}
output.PrintAction(cmd.OutOrStdout(), "Alias deleted", args[0], false)
},
}