Skip to content
Source
Sign inSign up
pingdotgg/t3code

fix(server): t3 service install no longer moves a --base-dir service onto an empty ~/.t3 #23878

Mergedshivamhwp(GitHub profile, opens in a new tab)merged 6 commits intomain fromrefs/pull/23878/headmerged by shivamhwp(GitHub profile, opens in a new tab) View on GitHub

Showing 7 changed files with 95 additions and 12 deletions (loading 4).

x
0 of 7 viewed, 7 left
26 additions and 10 deletionsapps/server/src/cli/service.test.tsModified
View file
@@ -59,13 +59,33 @@
​
it.layer(Layer.mergeAll(NodeServices.layer, NetService.layer))("service commands", (it) => {
- it.effect.each(["install", "update"] as const)(
- "%s refuses a downgrade before changing the service",
- (command) =>
+ it.effect.each(
+ (["install", "update"] as const).flatMap((command) => [
+ {
+ command,
+ label: "a downgrade",
+ status: newerServiceStatus,
+ error: {
+ _tag: "BootServiceDowngradeRefusedError",
+ installedVersion: "999.0.0",
+ targetVersion: packageJson.version,
+ },
+ },
+ // This home's newer state must not ask for --allow-downgrade first.
+ {
+ command,
+ label: "another home's service",
+ status: { ...newerServiceStatus, otherBaseDir: "/srv/t3" },
+ error: { _tag: "BootServiceOtherBaseDirError", installedBaseDir: "/srv/t3" },
+ },
+ ]),
+ )(
+ "$command refuses $label before changing the service",
+ ({ command, status: serviceStatus, error: expected }) =>