Skip to content

Infisical is the open-source platform for securing secrets, certificates, access, and AI Agents.

fix tests

adilson421bb562a5d4
diff --git a/backend/e2e-test/routes/v1/user-activation.spec.ts b/backend/e2e-test/routes/v1/user-activation.spec.ts
index 462ca07d55..075a170910 100644
--- a/backend/e2e-test/routes/v1/user-activation.spec.ts
+++ b/backend/e2e-test/routes/v1/user-activation.spec.ts
@@ -188,12 +188,12 @@ describe("User Activation Router", () => {
test("returning after 7 days → returnedAfterSevenDaysAt is set", async () => {
const db = getDb();
- const org = await createOrgWithAdmin(db, daysAgo(10));
+ const org = await createOrgWithAdmin(db, daysAgo(14));
await db(TableName.UserSecretActivation).insert({
userId: seedData1.id,
orgId: org.id,
- firstSecretCreatedAt: daysAgo(8),
- returnedAfterThreeDaysAt: daysAgo(5)
+ firstSecretCreatedAt: daysAgo(11),
+ returnedAfterThreeDaysAt: daysAgo(8) // 8d >= 7d since the three-day nudge → SEVEN_DAYS fires
});
const res = await callActivation(org.id);
diff --git a/backend/vitest.e2e.config.mts b/backend/vitest.e2e.config.mts
index 569a02b1f7..9838e1ebe8 100644
--- a/backend/vitest.e2e.config.mts
+++ b/backend/vitest.e2e.config.mts
@@ -6,6 +6,8 @@ export default defineConfig({
globals: true,
env: {
NODE_ENV: "test",
+ // Gates the secrets-activation nudge feature; off by default, enabled here so its e2e spec runs.
+ SECRETS_ACTIVATION_ENABLED: "true",
E2E_TEST_ORACLE_DB_19_HOST: process.env.E2E_TEST_ORACLE_DB_19_HOST!,
E2E_TEST_ORACLE_DB_19_USERNAME: process.env.E2E_TEST_ORACLE_DB_19_USERNAME!,
E2E_TEST_ORACLE_DB_19_PASSWORD: process.env.E2E_TEST_ORACLE_DB_19_PASSWORD!,