test: expect the MCP paths reserved

This commit is contained in:
2026-10-28 14:08:16 +01:00
parent e22b36e03f
commit 0ac83de8b2

View File

@@ -119,6 +119,7 @@ func TestStaticReservedPaths(t *testing.T) {
"/oauth", "/oauth/microsoft", "/oauth/microsoft/callback",
"/_chat", "/_chat/x", "/_chat/api/v1/conversations/1/messages",
"/_chatchannels", "/_chatchannels/x", "/_chatbots", "/_chatbots/x",
"/mcp", "/mcp/x", "/.well-known", "/.well-known/x",
} {
rec := get(h, http.MethodGet, p, nil)
if rec.Code != http.StatusNotFound || strings.Contains(rec.Body.String(), "app") {
@@ -126,7 +127,7 @@ func TestStaticReservedPaths(t *testing.T) {
}
}
// Names that merely start like a reserved prefix are client routes.
for _, p := range []string{"/bmadmins", "/storage-info", "/_users", "/oauthy", "/_chatty"} {
for _, p := range []string{"/bmadmins", "/storage-info", "/_users", "/oauthy", "/_chatty", "/connect", "/mcpx"} {
if rec := get(h, http.MethodGet, p, nil); rec.Code != http.StatusOK {
t.Fatalf("GET %s = %d, want the fallback", p, rec.Code)
}