ci: expand shared package validation and test coverage
Lint / Lint (push) Successful in 32s
Docker / Docker Build & Push (push) Failing after 2m22s
Tests / Go backend (push) Failing after 1m2s
Tests / Dashboard checks (push) Failing after 35s

- Add lint, formatting, vet, and publish workflow checks
- Run Go database tests with PostgreSQL and add Java tests
- Make consumer sync opt-in; update docs and Go dependency
This commit is contained in:
Gabriel20xx committed 2026-10-19 21:46:52 +00:00
1 parent 937f51b4fb
commit 0ff94f9b10
107 files changed
+10124 -410

No files matched your search

@@ -149,3 +149,26 @@ func TestHandlerAppliesPushedInfo(t *testing.T) {
t.Fatal("response echoed the ContentScanner secret")
}
}
func TestHandlerRejectsNonHTTPURLsWithoutChangingStore(t *testing.T) {
store := NewStore(Info{AuthGuardURL: "http://auth.example.com"})
handler := Handler("s3cret", store)
for _, bad := range []Info{
{AuthGuardURL: "javascript:alert(1)"},
{AuthGuardURL: "auth.example.com"},
{CarrierNodeURLs: []string{"http://carrier.example.com", "file:///etc/passwd"}},
{ContentScannerURL: "http://"},
} {
body, _ := json.Marshal(bad)
req := httptest.NewRequest(http.MethodPut, "/api/core-services/internal", bytes.NewReader(body))
req.Header.Set("X-Internal-Auth", "s3cret")
rec := httptest.NewRecorder()
handler(rec, req)
if rec.Code != http.StatusBadRequest {
t.Fatalf("status = %d for %+v, want 400", rec.Code, bad)
}
}
if got := store.Get(); got.AuthGuardURL != "http://auth.example.com" || len(got.CarrierNodeURLs) != 0 {
t.Fatalf("store changed by a rejected push: %+v", got)
}
}