running and cancel all commands
This commit is contained in:
1 parent
917a361370
commit
af249326e8
7 files changed
+145
-6
No files matched your search
@@ -18,7 +18,7 @@ func TestEveryCommandIsListed(t *testing.T) {
|
||||
for _, tool := range s.tools() {
|
||||
names = append(names, tool.(map[string]any)["name"].(string))
|
||||
}
|
||||
for _, want := range []string{"send_file", "status", "sessions", "nodes", "permissions", "stop", "scale", "keep",
|
||||
for _, want := range []string{"send_file", "status", "sessions", "running", "cancel_all", "nodes", "permissions", "stop", "scale", "keep",
|
||||
"storage", "move", "listen", "grant", "revoke", "reset_permissions", "dm_permission", "managers"} {
|
||||
if !strings.Contains(" "+strings.Join(names, " ")+" ", " "+want+" ") {
|
||||
t.Fatalf("%s missing from %v", want, names)
|
||||
@@ -85,6 +85,10 @@ func TestCommandCall(t *testing.T) {
|
||||
if !ok || c.Text(args) != "scale up" {
|
||||
t.Fatalf("by title: %+v %q %v", c, args, ok)
|
||||
}
|
||||
c, args, ok = CommandCall(acp.Update{Kind: "tool_call", Title: "slackerbot: cancel all"})
|
||||
if !ok || c.Text(args) != "cancel all" || !c.Changes(args) {
|
||||
t.Fatalf("cancel all by title: %+v %q %v", c, args, ok)
|
||||
}
|
||||
if _, _, ok := CommandCall(acp.Update{Kind: "tool_call", ToolName: "slackerbot__send_file"}); ok {
|
||||
t.Fatal("send_file isn't a command")
|
||||
}
|
||||
|
||||
Reference in new issue
Block a user