test(server): check waggle.db and the memory store instead of mind files (P1.5)
- trust wiring: read install_audit from waggle.db through the server; the old checks read a legacy personal.mind that nothing writes any more. - data dir: a fresh install is marked by waggle.db, not personal.mind. - backup: expect waggle.db and memory/ in the archive. - cross-platform: replace the MindDB block with waggle.db checks (file, WAL, foreign keys) and memory round trips (plain, Unicode, 100 KB) through server.memory. FTS5 and session CRUD were legacy-engine features. - store fixtures (install audit, cron) open WaggleDB instead of MindDB.
This commit is contained in:
@@ -24,7 +24,7 @@ import { describe, it, expect, beforeEach, afterEach } from 'vitest';
|
||||
import os from 'node:os';
|
||||
import Fastify from 'fastify';
|
||||
import { EventEmitter } from 'node:events';
|
||||
import { MindDB, CronStore, type CronSchedule } from '@waggle/core';
|
||||
import { WaggleDB, CronStore, type CronSchedule } from '@waggle/core';
|
||||
import { LocalScheduler, makeRecordExecutionCallback } from '../../src/local/cron.js';
|
||||
import { cronRoutes } from '../../src/local/routes/cron.js';
|
||||
import { notificationRoutes } from '../../src/local/routes/notifications.js';
|
||||
@@ -32,7 +32,7 @@ import { automationRoutes } from '../../src/local/routes/automations.js';
|
||||
import { securityMiddleware } from '../../src/local/security-middleware.js';
|
||||
|
||||
describe('Automations alias routes (Phase 3)', () => {
|
||||
let db: MindDB;
|
||||
let db: WaggleDB;
|
||||
let cronStore: CronStore;
|
||||
let scheduler: LocalScheduler;
|
||||
let executed: CronSchedule[];
|
||||
@@ -42,7 +42,7 @@ describe('Automations alias routes (Phase 3)', () => {
|
||||
let literalGlobalIsViewer: boolean;
|
||||
|
||||
beforeEach(async () => {
|
||||
db = new MindDB(':memory:');
|
||||
db = new WaggleDB(':memory:');
|
||||
cronStore = new CronStore(db);
|
||||
executed = [];
|
||||
failNext = false;
|
||||
|
||||
Reference in New Issue
Block a user