Phase 13, part 6: each team's Core

On the server and multi-tenant editions a team's admin enters its Core's
domain and account under Settings → Core & Hermes, instead of core.conf;
Hermes connects from the team's side with an agent's key.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
2026-11-25 12:29:44 -07:00
co-authored by Claude Opus 5.5
parent af6598271c
commit 1865140507
13 changed files with 166 additions and 34 deletions
+22
View File
@@ -358,3 +358,25 @@ func TestJobsRunPerTeam(t *testing.T) {
t.Errorf("files %s", ts.Files.String())
}
}
func TestCorePerTeam(t *testing.T) {
s, h := newMultiEdition(t)
_, _, ac := newTeam(t, s, "Acme", "olu@acme.example")
_, _, bc := newTeam(t, s, "Bolt", "bea@bolt.example")
if rec := as(h, ac, http.MethodPost, "/settings/core", url.Values{"domain": {"not a domain"}}); !strings.Contains(rec.Body.String(), "the Core&#39;s domain") {
t.Errorf("bad domain: %s", rec.Body.String())
}
if rec := as(h, ac, http.MethodPost, "/settings/core", url.Values{"domain": {"https://core.acme.example/"}, "email": {"olu@core.acme.example"}}); rec.Code != http.StatusSeeOther {
t.Fatalf("save: %d", rec.Code)
}
body := as(h, ac, http.MethodGet, "/settings/core", nil).Body.String()
if !strings.Contains(body, `value="core.acme.example"`) || !strings.Contains(body, "Settings → Agents") || strings.Contains(body, "mcp.sock") {
t.Errorf("core page: %s", body)
}
if body := as(h, bc, http.MethodGet, "/settings/core", nil).Body.String(); strings.Contains(body, "acme") {
t.Error("another team's Core")
}
if body := as(h, ac, http.MethodGet, "/settings/connections", nil).Body.String(); !strings.Contains(body, "core.acme.example") {
t.Error("not on Connections")
}
}