Skip to content
Source
Sign inSign up
pingdotgg/t3code

fix(server): block updates under legacy service launchers #11940

MergedGigioxx(GitHub profile, opens in a new tab)merged 1 commit intomain fromrefs/pull/11940/headmerged by juliusmarminge View on GitHub

Showing 2 changed files with 13 additions and 5 deletions.

x
0 of 2 viewed, 2 left
10 additions and 3 deletionsapps/server/src/cloud/servicePreflight.test.tsModified
View file
@@ -3,15 +3,22 @@
import { runServicePreflight } from "./servicePreflight.ts";
import { SERVICE_LAUNCHER_PROTOCOL } from "./serviceProtocol.ts";
​
-it("requires the database-snapshot launcher protocol", () => {
+it.each([1, 2])("blocks legacy launcher protocol %i", (launcherProtocol) => {
expect(
runServicePreflight({
databasePath: "/missing/state.sqlite",
- launcherProtocol: SERVICE_LAUNCHER_PROTOCOL - 1,
+ launcherProtocol,
version: "1.2.3",
}),
- ).toMatchObject({ status: "blocked", version: "1.2.3" });
+ ).toEqual({
+ status: "blocked",
+ version: "1.2.3",
+ reason:
+ "This release requires a newer T3 Code service launcher. Update it on the server machine.",
+ });
+});
​
+it("accepts the current launcher protocol", () => {
expect(
runServicePreflight({
databasePath: "/missing/state.sqlite",
3 additions and 2 deletionsapps/server/src/cloud/serviceProtocol.tsModified
View file
@@ -1,7 +1,8 @@