mirror of
https://github.com/Crosstalk-Solutions/project-nomad.git
synced 2026-10-17 05:14:19 +02:00
The Knowledge Base's "Start Qdrant" button called start on a container that no longer existed. The server answered 200 with success: false, the modal ignored that flag, and the button polled the health check forever. Starting a dependency service whose container is gone now recreates it from its stored config through the normal install path. Its data lives on a host bind mount, so nothing is lost. The modal shows a refused start as an error, and stops waiting after five minutes if Qdrant never comes online. Fixes #1426
22 lines
804 B
TypeScript
22 lines
804 B
TypeScript
import * as assert from 'node:assert/strict'
|
|
import { test } from 'node:test'
|
|
|
|
import { recreatesOnStart } from '../../app/utils/dependency_start.js'
|
|
|
|
test('starting a dependency service whose container is gone recreates it', () => {
|
|
assert.equal(recreatesOnStart('start', true, false), true)
|
|
})
|
|
|
|
test('starting a dependency service whose container exists just starts it', () => {
|
|
assert.equal(recreatesOnStart('start', true, true), false)
|
|
})
|
|
|
|
test('stop and restart never recreate a missing dependency container', () => {
|
|
assert.equal(recreatesOnStart('stop', true, false), false)
|
|
assert.equal(recreatesOnStart('restart', true, false), false)
|
|
})
|
|
|
|
test('starting a user-facing app with no container does not recreate it', () => {
|
|
assert.equal(recreatesOnStart('start', false, false), false)
|
|
})
|