test(server): stop seeding a legacy personal mind (P1.5)

The server no longer opens personal.mind, so tests build it on an empty
data directory. The /memory command test seeds its two memories through
server.memory and now checks that the seeded text is found.
This commit is contained in:
shumeiko.it
2026-10-24 17:07:10 +02:00
parent f1cde9a32f
commit 6573f817b0
26 changed files with 13 additions and 235 deletions

View File

@@ -6,7 +6,6 @@ import { describe, it, expect, beforeAll, afterAll, vi } from 'vitest';
import fs from 'node:fs';
import path from 'node:path';
import os from 'node:os';
import { MindDB, SessionStore, FrameStore } from '@waggle/core';
import { buildLocalServer } from '../src/local/index.js';
import { OfflineManager } from '../src/local/offline-manager.js';
import { EventEmitter } from 'node:events';
@@ -433,15 +432,6 @@ describe('Offline REST routes', () => {
beforeAll(async () => {
tmpDir = fs.mkdtempSync(path.join(os.tmpdir(), 'waggle-offline-route-'));
// Create personal.mind
const personalPath = path.join(tmpDir, 'personal.mind');
const mind = new MindDB(personalPath);
const sessions = new SessionStore(mind);
const frames = new FrameStore(mind);
const s1 = sessions.create('offline-test');
frames.createIFrame(s1.gop_id, 'Test frame', 'normal');
mind.close();
serverBuild = buildLocalServer({ dataDir: tmpDir }).then(async (builtServer) => {
await builtServer.offlineManager.stop();
return builtServer;