Beschreibe Status-Endpunkte in der API-Meta
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
943553234d
commit
7d4a7f6194
2 changed files with 19 additions and 1 deletions
|
|
@ -15,6 +15,16 @@ func handleMeta(w http.ResponseWriter, _ *http.Request) {
|
|||
"method": http.MethodPost,
|
||||
"path": "/api/v1/tools/message-wall/resolve",
|
||||
},
|
||||
{
|
||||
"name": "screen-status-list",
|
||||
"method": http.MethodGet,
|
||||
"path": "/api/v1/screens/status",
|
||||
},
|
||||
{
|
||||
"name": "screen-status-detail",
|
||||
"method": http.MethodGet,
|
||||
"path": "/api/v1/screens/{screenId}/status",
|
||||
},
|
||||
},
|
||||
},
|
||||
})
|
||||
|
|
|
|||
|
|
@ -109,13 +109,21 @@ func TestRouterMeta(t *testing.T) {
|
|||
t.Fatalf("api.health = %q, want %q", got, want)
|
||||
}
|
||||
|
||||
if got, want := len(response.API.Tools), 1; got != want {
|
||||
if got, want := len(response.API.Tools), 3; got != want {
|
||||
t.Fatalf("len(api.tools) = %d, want %d", got, want)
|
||||
}
|
||||
|
||||
if got, want := response.API.Tools[0].Path, "/api/v1/tools/message-wall/resolve"; got != want {
|
||||
t.Fatalf("api.tools[0].path = %q, want %q", got, want)
|
||||
}
|
||||
|
||||
if got, want := response.API.Tools[1].Path, "/api/v1/screens/status"; got != want {
|
||||
t.Fatalf("api.tools[1].path = %q, want %q", got, want)
|
||||
}
|
||||
|
||||
if got, want := response.API.Tools[2].Path, "/api/v1/screens/{screenId}/status"; got != want {
|
||||
t.Fatalf("api.tools[2].path = %q, want %q", got, want)
|
||||
}
|
||||
}
|
||||
|
||||
func TestRouterPlayerStatusRoute(t *testing.T) {
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue