Queue server creation and verify health and selected map before completion

This commit is contained in:
2026-09-17 17:14:36 -04:00
parent f37014fad9
commit c2ad5cc95a
12 changed files with 232 additions and 50 deletions
+11 -1
View File
@@ -1,5 +1,15 @@
import { describe, expect, it } from 'vitest';
import { extractUdpPort } from '../../src/lib/server/integrations/komodo.js';
import { extractUdpPort, extractContainerState } from '../../src/lib/server/integrations/komodo.js';
describe('container readiness', () => {
it.each(['starting', 'unhealthy'])('does not accept a running container whose health is %s', (health) => {
expect(extractContainerState({ State: { Status: 'running', Running: true, Health: { Status: health } } })).toBe(health);
});
it('accepts healthy running containers and preserves stopped states', () => {
expect(extractContainerState({ State: { Status: 'running', Running: true, Health: { Status: 'healthy' } } })).toBe('running');
expect(extractContainerState({ State: { Status: 'exited', Running: false, Health: { Status: 'healthy' } } })).toBe('exited');
});
});
describe('extractUdpPort', () => {
it('returns the published port from docker-compose-style object entries', () => {