Skip to content
Source
Sign inSign up
pingdotgg/t3code

fix(server): t3 service uninstall leaves another T3 home's service alone #29872

Mergedsaphid(GitHub profile, opens in a new tab)merged 1 commit intomain fromrefs/pull/29872/headmerged by maria-rcks View on GitHub

Showing 2 changed files with 66 additions and 2 deletions.

x
0 of 2 viewed, 2 left
50 additions and 2 deletionsapps/server/src/cli/service.test.tsModified
View file
@@ -32,6 +32,7 @@
) {
const installOptions: Array<Parameters<BootService.BootService["Service"]["install"]>[0]> = [];
const restarts: Array<true> = [];
+ const uninstalls: Array<true> = [];
const service = BootService.BootService.of({
status: Effect.succeed(serviceStatus),
withStopped: (operation) => operation,
@@ -49,9 +50,12 @@
logPath: serviceStatus.logPath,
};
}),
- uninstall: Effect.succeed(false),
+ uninstall: Effect.sync(() => {
+ uninstalls.push(true);
+ return serviceStatus.installed;
+ }),
});
- return { service, installOptions, restarts };
+ return { service, installOptions, restarts, uninstalls };
​
it.layer(Layer.mergeAll(NodeServices.layer, NetService.layer))("service commands", (it) => {
@@ -194,4 +198,48 @@
expect(installOptions).toEqual([]);
}),
+​