mirror of
https://github.com/davidkaya/aryx.git
synced 2026-07-26 14:38:45 +02:00
Add OTLP export wiring for the sidecar and dev scripts to launch the standalone Aspire Dashboard during development. Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
46 lines
1.1 KiB
TypeScript
46 lines
1.1 KiB
TypeScript
import { describe, expect, test } from 'bun:test';
|
|
|
|
import {
|
|
aspireDashboardContainerName,
|
|
aspireDashboardImage,
|
|
aspireDashboardUrls,
|
|
createAspireDashboardRunArgs,
|
|
createOpenTelemetryEnvironment,
|
|
} from '../../scripts/aspireDashboard';
|
|
|
|
describe('aspire dashboard helpers', () => {
|
|
test('creates the official standalone Docker command with mapped OTLP ports', () => {
|
|
expect(createAspireDashboardRunArgs()).toEqual([
|
|
'run',
|
|
'--rm',
|
|
'-d',
|
|
'--name',
|
|
aspireDashboardContainerName,
|
|
'-p',
|
|
'18888:18888',
|
|
'-p',
|
|
'4317:18889',
|
|
'-p',
|
|
'4318:18890',
|
|
'-e',
|
|
'ASPIRE_DASHBOARD_UNSECURED_ALLOW_ANONYMOUS=true',
|
|
aspireDashboardImage,
|
|
]);
|
|
});
|
|
|
|
test('injects OTLP exporter settings for local Aspire development', () => {
|
|
expect(
|
|
createOpenTelemetryEnvironment(
|
|
{
|
|
PATH: 'C:\\tools',
|
|
},
|
|
aspireDashboardUrls.otlpGrpc,
|
|
),
|
|
).toEqual({
|
|
PATH: 'C:\\tools',
|
|
OTEL_EXPORTER_OTLP_ENDPOINT: aspireDashboardUrls.otlpGrpc,
|
|
OTEL_EXPORTER_OTLP_PROTOCOL: 'grpc',
|
|
});
|
|
});
|
|
});
|