14 lines
712 B
TypeScript
14 lines
712 B
TypeScript
import { readFile } from 'node:fs/promises';
|
|
import { resolve } from 'node:path';
|
|
import { describe, expect, it } from 'vitest';
|
|
|
|
describe('Microsoft Security Baseline schema', () => {
|
|
it('keeps global baseline catalog records and private storage references separate from tenant imports', async () => {
|
|
const sql = await readFile(resolve(import.meta.dirname, '..', '..', 'server', 'postgres', 'migrations', '011_microsoft_security_baselines.sql'), 'utf8');
|
|
expect(sql).toMatch(/CREATE TABLE assessor_microsoft_security_baselines/);
|
|
expect(sql).toMatch(/sha256 text NOT NULL UNIQUE/);
|
|
expect(sql).toMatch(/storage_key text NOT NULL UNIQUE/);
|
|
expect(sql).not.toMatch(/project_id/);
|
|
});
|
|
});
|