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:
@@ -3,7 +3,7 @@
|
||||
* connect-audit, and the GET /api/connectors lastSyncAt enrichment.
|
||||
*
|
||||
* Real VaultStore in a tmpdir + real ConnectorRegistry with a BaseConnector
|
||||
* fake + real InstallAuditStore over MindDB(':memory:'), real route plugin,
|
||||
* fake + real InstallAuditStore over WaggleDB(':memory:'), real route plugin,
|
||||
* server.inject — same harness style as the Phase-3 suites.
|
||||
*/
|
||||
|
||||
@@ -12,7 +12,7 @@ import Fastify from 'fastify';
|
||||
import * as fs from 'node:fs';
|
||||
import * as path from 'node:path';
|
||||
import * as os from 'node:os';
|
||||
import { MindDB, InstallAuditStore, VaultStore, type SecretStore } from '@waggle/core';
|
||||
import { WaggleDB, InstallAuditStore, VaultStore, type SecretStore } from '@waggle/core';
|
||||
import {
|
||||
ConnectorRegistry,
|
||||
BaseConnector,
|
||||
@@ -68,7 +68,7 @@ describe('Connector routes — Phase 4 extensions', () => {
|
||||
let vault: VaultStore;
|
||||
let registry: ConnectorRegistry;
|
||||
let connector: TestConnector;
|
||||
let db: MindDB;
|
||||
let db: WaggleDB;
|
||||
let auditStore: InstallAuditStore;
|
||||
let server: ReturnType<typeof Fastify>;
|
||||
|
||||
@@ -78,7 +78,7 @@ describe('Connector routes — Phase 4 extensions', () => {
|
||||
connector = new TestConnector();
|
||||
registry = new ConnectorRegistry(vault);
|
||||
registry.register(connector);
|
||||
db = new MindDB(':memory:');
|
||||
db = new WaggleDB(':memory:');
|
||||
auditStore = new InstallAuditStore(db);
|
||||
|
||||
server = Fastify({ logger: false });
|
||||
|
||||
Reference in New Issue
Block a user