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:
@@ -9,7 +9,6 @@ import { describe, it, expect, beforeAll, afterAll } 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 type { FastifyInstance } from 'fastify';
|
||||
import { injectWithAuth } from '../test-utils.js';
|
||||
@@ -26,15 +25,6 @@ describe('Cost Dashboard API', () => {
|
||||
fs.mkdirSync(path.join(tmpDir, 'skills'), { recursive: true });
|
||||
fs.writeFileSync(path.join(tmpDir, 'skills', '.starter-installed'), 'test');
|
||||
|
||||
// Create personal.mind (required by buildLocalServer)
|
||||
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('cost-test');
|
||||
frames.createIFrame(s1.gop_id, 'Cost test frame', 'normal');
|
||||
mind.close();
|
||||
|
||||
server = await buildLocalServer({ dataDir: tmpDir });
|
||||
});
|
||||
|
||||
@@ -151,9 +141,6 @@ describe('Cost Dashboard API', () => {
|
||||
path.join(restartDir, 'config.json'),
|
||||
JSON.stringify({ tier: 'TEAMS', dailyBudget: 10 }),
|
||||
);
|
||||
const mind = new MindDB(path.join(restartDir, 'personal.mind'));
|
||||
mind.close();
|
||||
|
||||
initialServer = await buildLocalServer({ dataDir: restartDir });
|
||||
const traceId = initialServer.traceStore.start({
|
||||
sessionId: 'persisted-cost-dashboard-source',
|
||||
|
||||
Reference in New Issue
Block a user