Queue server creation and verify health and selected map before completion
This commit is contained in:
@@ -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', () => {
|
||||
|
||||
Reference in New Issue
Block a user