mirror of
https://gh-proxy.org/https://github.com/klinsmaya/multica.git
synced 2026-11-08 01:16:45 +08:00
* fix(runtimes): rename Qoder Cloud Agent to Qoder Cloud Agents Qoder's product is called Qoder Cloud Agents, matching how Cursor Cloud Agents is already spelled in the runtime lists. Update the display name, default runtime name, error messages, translations, landing copy, docs and tests. Co-Authored-By: Claude Opus 5.5 <[email protected]> * fix(runtimes): use Qoder's current logo Replace the old green Qoder mark with the current monochrome mark from qoder.com/favIcon.svg. The background is removed, the paths are minified, and both paths use currentColor so the mark stays visible in dark mode. It applies to the Qoder, Qoder CN and Qoder Cloud Agents runtimes. Co-Authored-By: Claude Opus 5.5 <[email protected]> --------- Co-authored-by: 安辰 <[email protected]> Co-authored-by: Claude Opus 5.5 <[email protected]>
49 lines
1.4 KiB
Go
49 lines
1.4 KiB
Go
package handler
|
|
|
|
import (
|
|
"net/http"
|
|
"testing"
|
|
|
|
"github.com/google/uuid"
|
|
"github.com/multica-ai/multica/server/internal/testutil"
|
|
)
|
|
|
|
func TestDaemonRegisterExecutionMode(t *testing.T) {
|
|
if testHandler == nil {
|
|
t.Skip("database not available")
|
|
}
|
|
for _, tc := range []struct {
|
|
name, mode, want string
|
|
status int
|
|
}{
|
|
{"legacy", "", "local", http.StatusOK},
|
|
{"remote", "cloud", "local", http.StatusForbidden},
|
|
{"invalid", "unknown", "local", http.StatusBadRequest},
|
|
} {
|
|
t.Run(tc.name, func(t *testing.T) {
|
|
daemonID := uuid.NewString()
|
|
id := dbfx.Runtime(t, "mode fixture", testutil.Cols{"daemon_id": daemonID, "provider": func() string {
|
|
if tc.name == "legacy" {
|
|
return "claude"
|
|
}
|
|
return "qoder_cloud"
|
|
}(), "runtime_mode": "local"})
|
|
req := newDaemonTokenRequest("POST", "/api/daemon/register", map[string]any{
|
|
"workspace_id": testWorkspaceID, "daemon_id": daemonID,
|
|
"runtimes": []map[string]any{{"name": "Qoder Cloud Agents", "type": func() string {
|
|
if tc.name == "legacy" {
|
|
return "claude"
|
|
}
|
|
return "qoder_cloud"
|
|
}(), "runtime_mode": tc.mode, "status": "online"}},
|
|
}, testWorkspaceID, daemonID)
|
|
testutil.Call(t, testHandler.DaemonRegister, req).Want(tc.status)
|
|
var mode string
|
|
dbfx.QueryRow(t, `SELECT runtime_mode FROM agent_runtime WHERE id=$1`, id).Scan(&mode)
|
|
if mode != tc.want {
|
|
t.Fatalf("runtime_mode=%q, want %q", mode, tc.want)
|
|
}
|
|
})
|
|
}
|
|
}
|