test(auth): cover integrated account journey

- Exercise CLI provisioning through browser/API/MCP auth, run events, logout, and deletion.
- Allow integration coverage to reopen the same file-backed test database.
This commit is contained in:
agent committed 2026-11-09 15:58:49 -05:00
1 parent d4d9bceb98
commit 9ff9579a7b
2 files changed
+294 -2

No files matched your search

+4 -2
View File
@@ -50,7 +50,9 @@ import { LoggingInterceptor } from "../src/interceptors/logging.interceptor";
import { validateAppConfig } from "../src/config/app.config";
import { AuthModule } from "../src/auth/auth.module";
export async function buildTestApp(): Promise<INestApplication> {
export async function buildTestApp(
databasePath = ":memory:",
): Promise<INestApplication> {
// Each test app stores files in its own temp dir: suites run in parallel and
// some clean up their files dir, which must not affect other suites.
const filesDir = fs.mkdtempSync(path.join(os.tmpdir(), "liqa-test-files-"));
@@ -65,7 +67,7 @@ export async function buildTestApp(): Promise<INestApplication> {
}),
// The real migrations, not synchronize, so tests use the schema production gets
TypeOrmModule.forRoot({
...dataSourceOptions(":memory:"),
...dataSourceOptions(databasePath),
migrationsRun: true,
}),
ScheduleModule.forRoot(),