Skip to content

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

test(audit-log-stream): accept plain boolean and number values in the license override helper

Calvin28d699dc4ea7
diff --git a/backend/e2e-test/testUtils/license.ts b/backend/e2e-test/testUtils/license.ts
index 2bba54ff74..abd3e032b7 100644
--- a/backend/e2e-test/testUtils/license.ts
+++ b/backend/e2e-test/testUtils/license.ts
@@ -4,7 +4,7 @@ import type { TFeatureSet } from "@app/ee/services/license/license-types";
// that exercises a paid feature. The e2e license is a fixed default (see the ./license-fns alias in
// vitest.e2e.config.mts) and getPlan hands out this one object, so the override is not scoped to an
// org: call the restore in afterAll, and keep specs that read it in the same file.
-export const overrideLicenseFeatures = (features: Partial<TFeatureSet>) => {
+export const overrideLicenseFeatures = (features: Partial<Record<keyof TFeatureSet, boolean | number>>) => {
const { license } = (globalThis as unknown as { testServices: { license: { onPremFeatures: TFeatureSet } } })
.testServices;
const plan = license.onPremFeatures as unknown as Record<string, unknown>;