Skip to content

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

type the knex client in the sql dynamic secret test

Dimitris Staratzis392e3e52a3f7
diff --git a/backend/src/ee/services/dynamic-secret/providers/sql-database.test.ts b/backend/src/ee/services/dynamic-secret/providers/sql-database.test.ts
index b06a553877..8863cf3dce 100644
--- a/backend/src/ee/services/dynamic-secret/providers/sql-database.test.ts
+++ b/backend/src/ee/services/dynamic-secret/providers/sql-database.test.ts
@@ -22,8 +22,9 @@ vi.mock("knex", async (importOriginal) => {
return {
default: (config: Knex.Config) => {
const db = realKnex(config);
+ const client = db.client as { _acquireOnlyConnection: () => Promise<ReturnType<typeof fakePgConnection>> };
// eslint-disable-next-line no-underscore-dangle
- db.client._acquireOnlyConnection = async () => fakePgConnection();
+ client._acquireOnlyConnection = async () => fakePgConnection();
return db;
}
};