mirror of
https://github.com/zadam/trilium.git
synced 2025-11-02 19:36:12 +01:00
integration-test: Set up system for resetting in-memory DB
This commit is contained in:
@@ -7,6 +7,8 @@ import anonymizationService from "../../services/anonymization.js";
|
||||
import consistencyChecksService from "../../services/consistency_checks.js";
|
||||
import { Request } from 'express';
|
||||
import ValidationError from "../../errors/validation_error.js";
|
||||
import sql_init from "../../services/sql_init.js";
|
||||
import becca_loader from "../../becca/becca_loader.js";
|
||||
|
||||
function getExistingBackups() {
|
||||
return backupService.getExistingBackups();
|
||||
@@ -28,6 +30,12 @@ function findAndFixConsistencyIssues() {
|
||||
consistencyChecksService.runOnDemandChecks(true);
|
||||
}
|
||||
|
||||
async function rebuildIntegrationTestDatabase() {
|
||||
sql.rebuildIntegrationTestDatabase();
|
||||
sql_init.initializeDb();
|
||||
becca_loader.load();
|
||||
}
|
||||
|
||||
function getExistingAnonymizedDatabases() {
|
||||
return anonymizationService.getExistingAnonymizedDatabases();
|
||||
}
|
||||
@@ -54,6 +62,7 @@ export default {
|
||||
backupDatabase,
|
||||
vacuumDatabase,
|
||||
findAndFixConsistencyIssues,
|
||||
rebuildIntegrationTestDatabase,
|
||||
getExistingAnonymizedDatabases,
|
||||
anonymize,
|
||||
checkIntegrity
|
||||
|
||||
Reference in New Issue
Block a user