feat: add Continuity register to Domovoy
CI / test (push) Successful in 1m15s

This commit is contained in:
m
2026-08-16 15:59:19 +03:00
parent 2877571bb3
commit 543b93105b
7 changed files with 147 additions and 8 deletions
+20
View File
@@ -78,6 +78,26 @@ func TestGatewayRoutesProspectiveItemToContinuity(t *testing.T) {
}
}
func TestGatewayRoutesProspectiveListToContinuity(t *testing.T) {
continuity := httptest.NewServer(http.HandlerFunc(func(w http.ResponseWriter, r *http.Request) {
if r.URL.Path != "/v1/creator/prospective-items" || r.URL.RawQuery != "limit=25" {
t.Fatalf("unexpected Continuity list target %s?%s", r.URL.Path, r.URL.RawQuery)
}
_, _ = io.WriteString(w, `{"Items":[]}`)
}))
defer continuity.Close()
handler, err := newHandler("http://core-runtime.invalid", continuity.URL, continuity.Client())
if err != nil {
t.Fatal(err)
}
request := httptest.NewRequest(http.MethodGet, "/api/prospective-items?limit=25", nil)
response := httptest.NewRecorder()
handler.ServeHTTP(response, request)
if response.Code != http.StatusOK || !strings.Contains(response.Body.String(), "Items") {
t.Fatalf("response = %d %s", response.Code, response.Body.String())
}
}
func TestConsoleAndSecurityHeaders(t *testing.T) {
handler, err := newHandler("http://core-runtime:8080", "http://continuity-runtime:8081", http.DefaultClient)
if err != nil {