feat(cli): enforce minio ingestion extractor checks in setup and doctor
This commit is contained in:
@@ -335,6 +335,55 @@ models:
|
||||
expect(registryCheck?.detail).toContain('unconfigured');
|
||||
});
|
||||
|
||||
it('reports SKIP for MinIO ingest extractors when MinIO is disabled', async () => {
|
||||
mkdirSync(testDir, { recursive: true });
|
||||
const configPath = join(testDir, 'minio-disabled.yaml');
|
||||
writeFileSync(configPath, `
|
||||
telegram:
|
||||
bot_token: "test-token"
|
||||
allowed_chat_ids: [123]
|
||||
models:
|
||||
default:
|
||||
provider: anthropic
|
||||
model: claude-sonnet
|
||||
backup:
|
||||
minio:
|
||||
enabled: false
|
||||
`);
|
||||
|
||||
const ctx: DoctorContext = { configPath, dataDir: testDir };
|
||||
const results = await runChecks(ctx);
|
||||
|
||||
const minioCheck = results.find(r => r.label.includes('MinIO ingest extractors'));
|
||||
expect(minioCheck?.status).toBe('skip');
|
||||
});
|
||||
|
||||
it('reports MinIO ingest extractor status when MinIO is enabled', async () => {
|
||||
mkdirSync(testDir, { recursive: true });
|
||||
const configPath = join(testDir, 'minio-enabled.yaml');
|
||||
writeFileSync(configPath, `
|
||||
telegram:
|
||||
bot_token: "test-token"
|
||||
allowed_chat_ids: [123]
|
||||
models:
|
||||
default:
|
||||
provider: anthropic
|
||||
model: claude-sonnet
|
||||
backup:
|
||||
minio:
|
||||
enabled: true
|
||||
`);
|
||||
|
||||
const ctx: DoctorContext = { configPath, dataDir: testDir };
|
||||
const results = await runChecks(ctx);
|
||||
|
||||
const minioCheck = results.find(r => r.label.includes('MinIO ingest extractors'));
|
||||
expect(minioCheck).toBeDefined();
|
||||
expect(['pass', 'warn']).toContain(minioCheck?.status);
|
||||
expect(minioCheck?.detail).toContain('pdf:');
|
||||
expect(minioCheck?.detail).toContain('docx:');
|
||||
});
|
||||
|
||||
it('reports PASS for skills registry when source is parsable', async () => {
|
||||
mkdirSync(testDir, { recursive: true });
|
||||
const registryPath = join(testDir, 'registry.json');
|
||||
|
||||
Reference in New Issue
Block a user