Files
windmill/cli/test/remote_version_unit.test.ts
T
Ruben FiszelandClaude Opus 5.5 61c4ae6d61 fix: show only the edition on /api/version to logged-out callers (#12812)
* fix: show only the edition on /api/version to logged-out callers

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>

* fix: only check for updates on the login header for a superadmin

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>

* fix: read an edition-only backend version as a current server in the cli

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>

* fix: serve the openapi spec with the edition as its version to logged-out callers

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>

---------

Co-authored-by: Claude Opus 5.5 <noreply@anthropic.com>
2026-12-02 10:52:39 +01:00

17 lines
632 B
TypeScript

import { expect, test } from "bun:test";
import {
isVersionsGeq1585,
updateGlobalVersions,
} from "../src/commands/sync/global.ts";
// A server gives the bare edition to a token that cannot authenticate on /api/version; read as
// an old server, `sync push` would rewrite every app's runnables to their legacy type names.
test("an edition-only version reads as a current server", () => {
updateGlobalVersions("EE v1.500.0");
expect(isVersionsGeq1585()).toBe(false);
updateGlobalVersions("EE");
expect(isVersionsGeq1585()).toBe(true);
updateGlobalVersions("CE v1.895.1");
expect(isVersionsGeq1585()).toBe(true);
});