feat: 完整游戏运维功能
This commit is contained in:
@@ -90,12 +90,24 @@ describe("ServerDetailPage config write approval", () => {
|
||||
expect(serverDetailPageSource).not.toContain("sqlite://");
|
||||
});
|
||||
|
||||
it("reviews and updates only redacted runtime binding metadata", () => {
|
||||
const runtimeBindingSectionSource = serverDetailPageSource.split("function RuntimeBindingSection")[1]?.split("function RuntimeDistributionSection")[0] ?? "";
|
||||
expect(serverDetailPageSource).toContain("getServerRuntimeBinding");
|
||||
expect(serverDetailPageSource).toContain("updateServerRuntimeBinding");
|
||||
expect(runtimeBindingSectionSource).toContain("missingKeys");
|
||||
expect(runtimeBindingSectionSource).toContain('type={field.sensitive ? "password" : "text"}');
|
||||
for (const forbidden of ["secret://", "/Users/", "/var/run/", "unix://", "tcp://", "mysql://", "sqlite://"]) {
|
||||
expect(runtimeBindingSectionSource).not.toContain(forbidden);
|
||||
}
|
||||
});
|
||||
|
||||
it("routes plugin lifecycle controls through platform lifecycle APIs instead of generic jobs", () => {
|
||||
expect(serverDetailPageSource).toContain('action === "install" || action === "restart" || action === "status"');
|
||||
expect(serverDetailPageSource).toContain('action !== "start" && action !== "stop"');
|
||||
expect(serverDetailPageSource).toContain('control.lifecycleAction === "start" || control.lifecycleAction === "stop"');
|
||||
expect(serverDetailPageSource).toContain('action === "install" || action === "restart"');
|
||||
expect(serverDetailPageSource).toContain('action !== "start" && action !== "stop" && action !== "status"');
|
||||
expect(serverDetailPageSource).toContain('control.lifecycleAction === "start" || control.lifecycleAction === "stop" || control.lifecycleAction === "status"');
|
||||
expect(serverDetailPageSource).toContain("platformApiClient.startServerInstance(instance.id");
|
||||
expect(serverDetailPageSource).toContain("platformApiClient.stopServerInstance(instance.id");
|
||||
expect(serverDetailPageSource).toContain("platformApiClient.queryServerProcessStatus(instance.id");
|
||||
expect(serverDetailPageSource).toContain("serverLifecycleCommandRequest(instance, \"start\")");
|
||||
expect(serverDetailPageSource).toContain("serverLifecycleCommandRequest(instance, \"stop\")");
|
||||
expect(serverDetailPageSource).not.toContain('capability: "process.start"');
|
||||
|
||||
Reference in New Issue
Block a user