Externalize audit pipeline services
This commit is contained in:
@@ -13,10 +13,11 @@ test("integration readiness covers all MVP providers", () => {
|
||||
"google",
|
||||
"pagespeed",
|
||||
"openrouter",
|
||||
"playwright",
|
||||
"screenshotone",
|
||||
"smtp",
|
||||
"convex_jobs",
|
||||
"rybbit",
|
||||
"jina",
|
||||
],
|
||||
);
|
||||
});
|
||||
@@ -36,3 +37,45 @@ test("integration readiness reports missing configuration without leaking values
|
||||
assert.equal(JSON.stringify(rows).includes("secret-google"), false);
|
||||
assert.equal(JSON.stringify(rows).includes("secret-places"), false);
|
||||
});
|
||||
|
||||
test("integration readiness treats ScreenshotOne as required and Jina as optional", () => {
|
||||
const rows = getIntegrationReadiness({
|
||||
GOOGLE_GEOCODING_API_KEY: "secret-google",
|
||||
GOOGLE_PLACES_API_KEY: "secret-places",
|
||||
PAGESPEED_API_KEY: "secret-pagespeed",
|
||||
PAGESPEED_TIMEOUT_MS: "60000",
|
||||
OPENROUTER_API_KEY: "secret-openrouter",
|
||||
SMTP_HOST: "smtp.example.com",
|
||||
SMTP_USER: "user",
|
||||
SMTP_PASSWORD: "password",
|
||||
SMTP_FROM: "Audit <audit@example.com>",
|
||||
NEXT_PUBLIC_CONVEX_URL: "https://example.convex.cloud",
|
||||
CONVEX_DEPLOYMENT: "prod:example",
|
||||
RYBBIT_API_URL: "https://analytics.example.com",
|
||||
RYBBIT_API_KEY: "secret-rybbit",
|
||||
NEXT_PUBLIC_RYBBIT_SITE_ID: "site-id",
|
||||
});
|
||||
|
||||
const screenshotOne = rows.find((row) => row.id === "screenshotone");
|
||||
const jina = rows.find((row) => row.id === "jina");
|
||||
|
||||
assert.equal(screenshotOne?.status, "missing");
|
||||
assert.deepEqual(screenshotOne?.missingEnv, ["SCREENSHOTONE_API_KEY"]);
|
||||
assert.equal(jina?.status, "configured");
|
||||
assert.deepEqual(jina?.missingEnv, []);
|
||||
});
|
||||
|
||||
test("integration readiness no longer requires Playwright for the new pipeline", () => {
|
||||
const definitionIds = integrationReadinessDefinitions.map((definition) => definition.id as string);
|
||||
|
||||
assert.equal(
|
||||
definitionIds.includes("playwright"),
|
||||
false,
|
||||
);
|
||||
assert.equal(
|
||||
integrationReadinessDefinitions.some((definition) =>
|
||||
definition.requiredEnv.includes("TASK8_BROWSER_ASSET_URL"),
|
||||
),
|
||||
false,
|
||||
);
|
||||
});
|
||||
|
||||
Reference in New Issue
Block a user