Skip to content
Source
Sign inSign up
pingdotgg/t3code

fix(web,server): the server update banner copies a command that works under systemd #22773

Closeddw3105(GitHub profile, opens in a new tab)wants to merge 9 commits intomain fromrefs/pull/22773/headopened View on GitHub

Showing 9 changed files with 166 additions and 10 deletions (loading 6).

x
0 of 9 viewed, 9 left
60 additions and 0 deletionsapps/server/src/cli/invocation.test.tsModified
View file
@@ -7,11 +7,71 @@
​
import packageJson from "../../package.json" with { type: "json" };
import {
+ parseSystemdUnit,
+ systemdUnitLaunchesT3,
resolveHostCliCommand,
resolveRootCliCommand,
resolveServerInstallation,
} from "./invocation.ts";
​
+it("names only the service unit that would restart a stopped server", () => {
+ for (const [cgroup, expected] of [
+ [
+ "0::/user.slice/user-1000.slice/user@1000.service/app.slice/t3.service\n",
+ { name: "t3.service", scope: "user" },
+ ],
+ [
+ "12:cpu,cpuacct:/system.slice/t3.service\n1:name=systemd:/system.slice/t3.service\n",
+ { name: "t3.service", scope: "system" },
+ ],
+ ["0::/system.slice/t3.service/payload\n", { name: "t3.service", scope: "system" }],
+ [
+ "0::/user.slice/user-1000.slice/user@1000.service/app.slice/t3.service/payload\n",
+ { name: "t3.service", scope: "user" },
+ ],
+ ["0::/user.slice/user-1000.slice/user@1000.service/app.slice/app-term.scope", null],
+ ["0::/user.slice/user-1000.slice/session-4.scope", null],
+ ["0::/user.slice/user-1000.slice/user@1000.service", null],
+ ["0::/", null],