fix: tests failing

This commit is contained in:
Daniel Hougaard
2025-07-08 12:09:56 +04:00
parent 6bfcc59486
commit 6dfe5854ea
6 changed files with 29 additions and 14 deletions
+2 -2
View File
@@ -1,8 +1,8 @@
import { FastifyInstance, RawReplyDefaultExpression, RawRequestDefaultExpression, RawServerDefault } from "fastify";
import { TCryptographyFactory } from "@app/lib/crypto/cryptography";
import { CustomLogger } from "@app/lib/logger/logger";
import { ZodTypeProvider } from "@app/server/plugins/fastify-zod";
import { TSuperAdminDALFactory } from "@app/services/super-admin/super-admin-dal";
declare global {
type FastifyZodProvider = FastifyInstance<
@@ -15,6 +15,6 @@ declare global {
// used only for testing
const testServer: FastifyZodProvider;
const testCryptoProvider: TCryptographyFactory;
const testSuperAdminDAL: TSuperAdminDALFactory;
const jwtAuthToken: string;
}
@@ -3,11 +3,12 @@ import { Knex } from "knex";
import { chunkArray } from "@app/lib/fn";
import { selectAllTableCols } from "@app/lib/knex";
import { logger } from "@app/lib/logger";
import { initLogger, logger } from "@app/lib/logger";
import { SecretType, TableName } from "../schemas";
export async function up(knex: Knex): Promise<void> {
initLogger();
logger.info("Starting secret version fix migration");
// Get all shared secret IDs first to optimize versions query
@@ -133,6 +134,7 @@ export async function up(knex: Knex): Promise<void> {
}
export async function down(): Promise<void> {
initLogger();
logger.info("Rollback not implemented for secret version fix migration");
// Note: Rolling back this migration would be complex and potentially destructive
// as it would require tracking which version entries were added
-1
View File
@@ -348,7 +348,6 @@ export const computeMd5 = (message: string, digest: DigestType = DigestType.Hex)
};
const cryptographyFactory = () => {
// placeholder for now
let $fipsEnabled = false;
let $isInitialized = false;