Files
aryx/tests/scripts/aspireDashboard.test.ts
David KayaandCopilot f7d376fc41 feat: add Aspire dashboard OTEL workflow
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>
2026-04-16 10:39:36 +02:00

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',
});
});
});