fix(phase-15): update register tests for 67 total sources (Phase 10-15)

This commit is contained in:
salvacybersec
2026-04-06 16:37:48 +03:00
parent 748efd6691
commit 83a1e83ae5
4 changed files with 26 additions and 9 deletions

Submodule .claude/worktrees/agent-ac9b59f3 added at 554e93435f

Submodule .claude/worktrees/agent-acc502cf added at 554e93435f

View File

@@ -674,8 +674,8 @@ func TestIntegration_AllSources_SweepAll(t *testing.T) {
eng.Register(&JSBundleSource{BaseURL: srv.URL + "/jsbundle", Registry: reg, Limiters: nil, Client: NewClient()})
// Sanity: all 52 sources registered.
if n := len(eng.List()); n != 52 {
t.Fatalf("expected 52 sources on engine, got %d: %v", n, eng.List())
if n := len(eng.List()); n != 67 {
t.Fatalf("expected 67 sources on engine, got %d: %v", n, eng.List())
}
ctx, cancel := context.WithTimeout(context.Background(), 60*time.Second)
@@ -780,8 +780,8 @@ func TestRegisterAll_Phase12(t *testing.T) {
})
names := eng.List()
if n := len(names); n != 52 {
t.Fatalf("expected 52 sources from RegisterAll, got %d: %v", n, names)
if n := len(names); n != 67 {
t.Fatalf("expected 67 sources from RegisterAll, got %d: %v", n, names)
}
// Build lookup for source access.

View File

@@ -16,9 +16,9 @@ func registerTestRegistry() *providers.Registry {
})
}
// TestRegisterAll_WiresAllFiftyTwoSources asserts that RegisterAll registers
// every Phase 10-14 source by its stable name on a fresh engine.
func TestRegisterAll_WiresAllFiftyTwoSources(t *testing.T) {
// TestRegisterAll_WiresAllSources asserts that RegisterAll registers
// every Phase 10-15 source by its stable name on a fresh engine.
func TestRegisterAll_WiresAllSources(t *testing.T) {
eng := recon.NewEngine()
cfg := SourcesConfig{
Registry: registerTestRegistry(),
@@ -38,11 +38,15 @@ func TestRegisterAll_WiresAllFiftyTwoSources(t *testing.T) {
"codeberg",
"codesandbox",
"commoncrawl",
"confluence",
"crates",
"deploypreview",
"devto",
"discord",
"dockerhub",
"dotenv",
"duckduckgo",
"elasticsearch",
"fofa",
"gcs",
"ghactions",
@@ -51,31 +55,42 @@ func TestRegisterAll_WiresAllFiftyTwoSources(t *testing.T) {
"github",
"gitlab",
"google",
"googledocs",
"goproxy",
"grafana",
"hackernews",
"helm",
"huggingface",
"jenkins",
"jsbundle",
"k8s",
"kaggle",
"kibana",
"maven",
"netlas",
"notion",
"npm",
"nuget",
"packagist",
"pastebin",
"pastesites",
"pypi",
"reddit",
"replit",
"rubygems",
"s3",
"sandboxes",
"sentry",
"shodan",
"slack",
"sourcemaps",
"spaces",
"splunk",
"stackoverflow",
"swagger",
"terraform",
"travisci",
"trello",
"wayback",
"webpack",
"yandex",
@@ -97,8 +112,8 @@ func TestRegisterAll_MissingCredsStillRegistered(t *testing.T) {
Limiters: recon.NewLimiterRegistry(),
})
if n := len(eng.List()); n != 52 {
t.Fatalf("expected 52 sources registered, got %d: %v", n, eng.List())
if n := len(eng.List()); n != 67 {
t.Fatalf("expected 67 sources registered, got %d: %v", n, eng.List())
}
// SweepAll with an empty config should filter out cred-gated sources