29 lines
731 B
TypeScript
29 lines
731 B
TypeScript
/**
|
|
* Mock for @lilith/service-registry used in CMS backend tests.
|
|
*/
|
|
import { vi } from 'vitest'
|
|
|
|
export const getDatabaseConfig = vi.fn(() => ({
|
|
host: 'localhost',
|
|
port: 5432,
|
|
username: 'test',
|
|
password: 'test',
|
|
database: 'test_cms',
|
|
}))
|
|
|
|
export const buildDeploymentRegistry = vi.fn(() => ({
|
|
getDatabaseConfig: () => ({
|
|
host: 'localhost',
|
|
port: 5432,
|
|
username: 'test',
|
|
password: 'test',
|
|
database: 'test_cms',
|
|
}),
|
|
services: new Map(),
|
|
deployments: new Map(),
|
|
sharedServices: new Map(),
|
|
}))
|
|
|
|
export const getServiceUrl = vi.fn((_service: string) => 'http://localhost:3010')
|
|
export const loadAllDeployments = vi.fn(() => new Map())
|
|
export const loadSharedServices = vi.fn(() => new Map())
|