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:
@@ -8,7 +8,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 type { FastifyInstance } from 'fastify';
|
||||
import { injectWithAuth } from '../test-utils.js';
|
||||
@@ -73,13 +72,6 @@ describe('Provider API', () => {
|
||||
prevOllamaHost = process.env.OLLAMA_HOST;
|
||||
process.env.OLLAMA_HOST = 'http://127.0.0.1:1';
|
||||
tmpDir = fs.mkdtempSync(path.join(os.tmpdir(), 'waggle-providers-'));
|
||||
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('providers-test');
|
||||
frames.createIFrame(s1.gop_id, 'Provider test', 'normal');
|
||||
mind.close();
|
||||
server = await buildLocalServer({ dataDir: tmpDir });
|
||||
});
|
||||
|
||||
@@ -349,13 +341,6 @@ describe('Model Validation', () => {
|
||||
|
||||
beforeAll(async () => {
|
||||
tmpDir = fs.mkdtempSync(path.join(os.tmpdir(), 'waggle-model-val-'));
|
||||
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('model-val-test');
|
||||
frames.createIFrame(s1.gop_id, 'Model validation test', 'normal');
|
||||
mind.close();
|
||||
// Set TRIAL tier so we're not capped at the FREE limit (5 workspaces).
|
||||
// Without this, ensureDefault() + 4 test workspaces = 5, making the next
|
||||
// POST hit the tier limit (403) before reaching model validation (400).
|
||||
|
||||
Reference in New Issue
Block a user