Files
OpenHands/__tests__/scripts/dev-static.test.ts
T
Rohit Malhotraandopenhands 22fe594133 feat: forward automation telemetry context (#1917)
* feat: forward telemetry context to automations

Co-authored-by: openhands <openhands@all-hands.dev>

* feat: sync automation telemetry consent

Co-authored-by: openhands <openhands@all-hands.dev>

* fix: default automation telemetry key in launchers

Co-authored-by: openhands <openhands@all-hands.dev>

* fix: bake production telemetry defaults into npm package

Co-authored-by: openhands <openhands@all-hands.dev>

* fix: dedupe automation consent sync

Co-authored-by: openhands <openhands@all-hands.dev>

* chore: bump automation version to 1.3.0

Co-authored-by: openhands <openhands@all-hands.dev>

---------

Co-authored-by: openhands <openhands@all-hands.dev>
2026-07-24 05:47:26 +00:00

28 lines
900 B
TypeScript

import { describe, expect, it } from "vitest";
import { buildAutomationBackendEnv } from "../../scripts/dev-static.mjs";
describe("dev-static", () => {
it("uses the same session key for both agent-server and automation backend auth", () => {
const env = buildAutomationBackendEnv(
{
agentServerPort: 18000,
ingressPort: 8000,
sessionApiKey: "shared-session-key",
stateDir: "/tmp/agent-canvas-state",
},
{},
);
// Both backends receive the same key value
expect(env).toMatchObject({
AUTOMATION_AGENT_SERVER_URL: "http://localhost:18000",
AUTOMATION_AGENT_SERVER_API_KEY: "shared-session-key",
AUTOMATION_LOCAL_API_KEY: "shared-session-key",
AUTOMATION_POSTHOG_API_KEY:
"phc_kBtz5nKmxVRRQ7HtPwr2QX9eMC5j65zE86QKocVNwb4U",
AUTOMATION_POSTHOG_HOST: "https://us.i.posthog.com",
});
});
});