Skip to content

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

test: update usage metering test for new reportSnapshots signature

Tre Dubravaa2dbdf9c39ee
diff --git a/backend/src/services/license-client/usage/usage-metering.test.ts b/backend/src/services/license-client/usage/usage-metering.test.ts
index 7355aa24d9..edd1dc100a 100644
--- a/backend/src/services/license-client/usage/usage-metering.test.ts
+++ b/backend/src/services/license-client/usage/usage-metering.test.ts
@@ -220,9 +220,9 @@ describe("usageEventQueue.handleUsageEvent (worker)", () => {
await queue.handleUsageEvent(ORG_ID, MaxIdentities.key);
expect(reportSnapshots).toHaveBeenCalledTimes(1);
- const [snapshots] = reportSnapshots.mock.calls[0] as unknown as [TUsageSnapshot[]];
+ const [orgId, snapshots] = reportSnapshots.mock.calls[0] as unknown as [string, TUsageSnapshot[]];
+ expect(orgId).toBe(ORG_ID);
expect(snapshots[0]).toMatchObject({
- org_id: ORG_ID,
feature_key: MaxIdentities.key,
value: 42,
source: "test-region"