Files
weichen 28fa06eaa5
ci / vet-and-test (push) Successful in 2s
ci / docker-checkout-hostgateway (push) Successful in 3s
Add the intent seed domain for the agent-intent module.
2026-09-29 15:18:32 +00:00

27 lines
524 B
Go

package domains
import (
"bytes"
"testing"
"error-code-system/errcode"
)
func TestEmbeddedCatalogMatchesRegistry(t *testing.T) {
r := errcode.NewRegistry()
RegisterAll(r)
for _, domain := range []string{"sys", "agent", "squad", "intent"} {
got, err := ExportDomain(r, domain)
if err != nil {
t.Fatal(err)
}
want, err := CatalogJSON(domain)
if err != nil {
t.Fatal(err)
}
if !bytes.Equal(got, want) {
t.Fatalf("%s.json drifted from registry\n got:\n%s\nwant:\n%s", domain, got, want)
}
}
}