Skip to content
Source
Sign inSign up
pingdotgg/t3code

feat(server): add safe service runtime pruning #7811

Closedpaulcatamio(GitHub profile, opens in a new tab)wants to merge 3 commits intomain fromrefs/pull/7811/headopened View on GitHub

Showing 8 changed files with 118 additions and 1 deletion (loading 5).

x
0 of 8 viewed, 8 left
23 additions and 0 deletionsapps/server/src/cli/service.test.tsModified
View file
@@ -13,6 +13,7 @@
import packageJson from "../../package.json" with { type: "json" };
import * as BootService from "../cloud/bootService.ts";
import {
+ formatServicePruneResult,
formatServiceStatus,
offerServiceDuringOnboarding,
reconcileService,
@@ -85,6 +86,7 @@
};
}),
uninstall: Effect.succeed(false),
+ prune: () => Effect.die("Prune is not exercised by this test."),
});
return { service, installOptions };
@@ -201,3 +203,24 @@
expect(ready).toBe(false);
}),
+​
+it("formats a service runtime prune preview", () => {
+ assert.equal(
+ formatServicePruneResult({ dryRun: true, versions: ["0.0.31", "0.0.32"] }),
+ ["Would prune 2 old T3 Code service runtimes:", " t3@0.0.31", " t3@0.0.32"].join("\n"),
+ );
+});
+​