Erweitere Basis-API um Status-Endpunkte
Ultraworked with [Sisyphus](https://github.com/code-yeongyu/oh-my-openagent) Co-authored-by: Sisyphus <clio-agent@sisyphuslabs.ai>
This commit is contained in:
parent
7d4a7f6194
commit
45e7b776ab
2 changed files with 11 additions and 1 deletions
|
|
@ -20,6 +20,8 @@ func NewRouter(store playerStatusStore) http.Handler {
|
|||
"version": "dev",
|
||||
"tools": []string{
|
||||
"message-wall-resolve",
|
||||
"screen-status-list",
|
||||
"screen-status-detail",
|
||||
},
|
||||
})
|
||||
})
|
||||
|
|
|
|||
|
|
@ -64,13 +64,21 @@ func TestRouterBaseAPI(t *testing.T) {
|
|||
t.Fatalf("version = %q, want %q", got, want)
|
||||
}
|
||||
|
||||
if got, want := len(response.Tools), 1; got != want {
|
||||
if got, want := len(response.Tools), 3; got != want {
|
||||
t.Fatalf("len(tools) = %d, want %d", got, want)
|
||||
}
|
||||
|
||||
if got, want := response.Tools[0], "message-wall-resolve"; got != want {
|
||||
t.Fatalf("tool[0] = %q, want %q", got, want)
|
||||
}
|
||||
|
||||
if got, want := response.Tools[1], "screen-status-list"; got != want {
|
||||
t.Fatalf("tool[1] = %q, want %q", got, want)
|
||||
}
|
||||
|
||||
if got, want := response.Tools[2], "screen-status-detail"; got != want {
|
||||
t.Fatalf("tool[2] = %q, want %q", got, want)
|
||||
}
|
||||
}
|
||||
|
||||
func TestRouterMeta(t *testing.T) {
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue