Remove SCUM server-management client path
This commit is contained in:
@@ -465,10 +465,10 @@ describe("PlatformApiClient AI providers", () => {
|
||||
}
|
||||
if (url.endsWith("/api/v1/server-instances/server-1/client-managers/generate") && init?.method === "POST") {
|
||||
expect(JSON.parse(String(init.body))).toEqual({
|
||||
profileKey: "scum-client-manager",
|
||||
profileKey: "example-client-manager",
|
||||
targetOs: "windows",
|
||||
targetArch: "amd64",
|
||||
repositoryUrl: "https://github.com/F88888/scum_client.git",
|
||||
repositoryUrl: "https://example.test/client-manager.git",
|
||||
sourceRevision: "main",
|
||||
idempotencyKey: "idem-client-generate"
|
||||
});
|
||||
@@ -476,33 +476,33 @@ describe("PlatformApiClient AI providers", () => {
|
||||
id: "client-dist-1",
|
||||
serverInstanceId: server.id,
|
||||
pluginId: plugin.id,
|
||||
profileKey: "scum-client-manager",
|
||||
profileKey: "example-client-manager",
|
||||
targetOs: "windows",
|
||||
targetArch: "amd64",
|
||||
repositoryUrl: "https://github.com/F88888/scum_client.git",
|
||||
repositoryUrl: "https://example.test/client-manager.git",
|
||||
sourceRevision: "main",
|
||||
buildJobId: "client-build-1",
|
||||
artifactId: "artifact-client-1",
|
||||
checksum: "sha256:clientchecksum",
|
||||
keyGeneration: 1,
|
||||
secretRef: "secret://runtime-keys/server-1/client-manager/scum-client-manager/current",
|
||||
secretRef: "secret://runtime-keys/server-1/client-manager/example-client-manager/current",
|
||||
status: "available",
|
||||
createdAt: "2026-07-03T00:00:00Z",
|
||||
updatedAt: "2026-07-03T00:00:00Z"
|
||||
});
|
||||
}
|
||||
if (url.endsWith("/api/v1/server-instances/server-1/client-managers/download") && init?.method === "POST") {
|
||||
expect(JSON.parse(String(init.body))).toEqual({ profileKey: "scum-client-manager" });
|
||||
return jsonResponse({ ...runtimeDownload, artifactId: "artifact-client-1", filename: "scum-client-manager.exe" });
|
||||
expect(JSON.parse(String(init.body))).toEqual({ profileKey: "example-client-manager" });
|
||||
return jsonResponse({ ...runtimeDownload, artifactId: "artifact-client-1", filename: "example-client-manager.exe" });
|
||||
}
|
||||
if (url.endsWith("/api/v1/server-instances/server-1/client-managers/key/reset") && init?.method === "POST") {
|
||||
expect(JSON.parse(String(init.body))).toEqual({ componentKind: "client-manager", componentKey: "scum-client-manager" });
|
||||
expect(JSON.parse(String(init.body))).toEqual({ componentKind: "client-manager", componentKey: "example-client-manager" });
|
||||
return jsonResponse({
|
||||
id: "runtime-key-server-1-client-2",
|
||||
serverInstanceId: server.id,
|
||||
componentKind: "client-manager",
|
||||
componentKey: "scum-client-manager",
|
||||
secretRef: "secret://runtime-keys/server-1/client-manager/scum-client-manager/current",
|
||||
componentKey: "example-client-manager",
|
||||
secretRef: "secret://runtime-keys/server-1/client-manager/example-client-manager/current",
|
||||
fingerprint: "def456abc123",
|
||||
generation: 2,
|
||||
status: "active",
|
||||
@@ -640,16 +640,16 @@ describe("PlatformApiClient AI providers", () => {
|
||||
await expect(client.listRunUpdates(server.id)).resolves.toMatchObject({ count: 1, items: [{ phase: "restart-requested", rollback: false }] });
|
||||
await expect(
|
||||
client.generateClientManager(server.id, {
|
||||
profileKey: "scum-client-manager",
|
||||
profileKey: "example-client-manager",
|
||||
targetOs: "windows",
|
||||
targetArch: "amd64",
|
||||
repositoryUrl: "https://github.com/F88888/scum_client.git",
|
||||
repositoryUrl: "https://example.test/client-manager.git",
|
||||
sourceRevision: "main",
|
||||
idempotencyKey: "idem-client-generate"
|
||||
})
|
||||
).resolves.toMatchObject({ artifactId: "artifact-client-1", profileKey: "scum-client-manager" });
|
||||
await expect(client.downloadLatestClientManager(server.id, { profileKey: "scum-client-manager" })).resolves.toMatchObject({ artifactId: "artifact-client-1" });
|
||||
await expect(client.resetClientManagerKey(server.id, { componentKind: "client-manager", componentKey: "scum-client-manager" })).resolves.toMatchObject({ generation: 2 });
|
||||
).resolves.toMatchObject({ artifactId: "artifact-client-1", profileKey: "example-client-manager" });
|
||||
await expect(client.downloadLatestClientManager(server.id, { profileKey: "example-client-manager" })).resolves.toMatchObject({ artifactId: "artifact-client-1" });
|
||||
await expect(client.resetClientManagerKey(server.id, { componentKind: "client-manager", componentKey: "example-client-manager" })).resolves.toMatchObject({ generation: 2 });
|
||||
await expect(client.checkDependencies(server.id, { probeKey: "java-21", idempotencyKey: "idem-dep-check" })).resolves.toMatchObject({ capability: "dependencies.check" });
|
||||
await expect(client.getDependencyCatalog(server.id)).resolves.toMatchObject({ targetOs: "linux", plans: [{ digest: runtimeDigest }] });
|
||||
await expect(client.installDependencies(server.id, { probeKey: "java-21", installPlanKey: "install-java-linux", planDigest: runtimeDigest, idempotencyKey: "idem-dep-install" })).resolves.toMatchObject({
|
||||
|
||||
@@ -3,7 +3,7 @@ import { afterEach, describe, expect, it, vi } from "vitest";
|
||||
import { PlatformApiClient } from "./client";
|
||||
|
||||
const lifecycle = {
|
||||
id: "installation-1", serverInstanceId: "server-1", pluginId: "game.scum", profileKey: "scum-client-manager", targetOs: "windows", targetArch: "amd64",
|
||||
id: "installation-1", serverInstanceId: "server-1", pluginId: "game.example", profileKey: "example-client-manager", targetOs: "windows", targetArch: "amd64",
|
||||
status: "available", phase: "artifact available", desiredVersion: "1.0.0", desiredRevision: "rev-1", desiredArtifactId: "artifact-1", keyGeneration: 1,
|
||||
deploymentGeneration: 0, health: "unknown", healthReason: "component is not installed", retryable: false, requiresRedeploy: false, updatedAt: "2026-07-18T08:00:00Z",
|
||||
distribution: { id: "distribution-1", artifactId: "artifact-1", sourceRevision: "rev-1", targetOs: "windows", targetArch: "amd64", checksum: `sha256:${"a".repeat(64)}`, keyGeneration: 1, status: "available" },
|
||||
@@ -23,17 +23,17 @@ describe("PlatformApiClient Client Manager lifecycle", () => {
|
||||
const client = new PlatformApiClient("/api/v1", () => "session-token");
|
||||
|
||||
await expect(client.listClientManagerLifecycles("server-1")).resolves.toMatchObject({ count: 1 });
|
||||
await expect(client.getClientManagerLifecycle("server-1", "scum-client-manager")).resolves.toMatchObject({ profileKey: "scum-client-manager" });
|
||||
await client.deployClientManager("server-1", { profileKey: "scum-client-manager", distributionId: "distribution-1", expectedDeploymentGeneration: 0, idempotencyKey: "deploy-1" });
|
||||
await client.controlClientManager("server-1", { profileKey: "scum-client-manager", operation: "start", expectedDeploymentGeneration: 1, idempotencyKey: "start-1" });
|
||||
await client.updateClientManager("server-1", { profileKey: "scum-client-manager", distributionId: "distribution-2", expectedDeploymentGeneration: 1, approved: true, idempotencyKey: "update-1" });
|
||||
await client.retryClientManagerLifecycle("server-1", { profileKey: "scum-client-manager", expectedDeploymentGeneration: 2, idempotencyKey: "retry-1" });
|
||||
await client.revokeClientManagerSession("server-1", { profileKey: "scum-client-manager", reason: "operator revoked component session" });
|
||||
await client.uninstallClientManager("server-1", { profileKey: "scum-client-manager", expectedDeploymentGeneration: 2, confirmed: true, idempotencyKey: "uninstall-1" });
|
||||
await expect(client.getClientManagerLifecycle("server-1", "example-client-manager")).resolves.toMatchObject({ profileKey: "example-client-manager" });
|
||||
await client.deployClientManager("server-1", { profileKey: "example-client-manager", distributionId: "distribution-1", expectedDeploymentGeneration: 0, idempotencyKey: "deploy-1" });
|
||||
await client.controlClientManager("server-1", { profileKey: "example-client-manager", operation: "start", expectedDeploymentGeneration: 1, idempotencyKey: "start-1" });
|
||||
await client.updateClientManager("server-1", { profileKey: "example-client-manager", distributionId: "distribution-2", expectedDeploymentGeneration: 1, approved: true, idempotencyKey: "update-1" });
|
||||
await client.retryClientManagerLifecycle("server-1", { profileKey: "example-client-manager", expectedDeploymentGeneration: 2, idempotencyKey: "retry-1" });
|
||||
await client.revokeClientManagerSession("server-1", { profileKey: "example-client-manager", reason: "operator revoked component session" });
|
||||
await client.uninstallClientManager("server-1", { profileKey: "example-client-manager", expectedDeploymentGeneration: 2, confirmed: true, idempotencyKey: "uninstall-1" });
|
||||
|
||||
expect(calls.map((call) => `${call.method} ${call.url}`)).toEqual([
|
||||
"GET /api/v1/server-instances/server-1/client-managers",
|
||||
"GET /api/v1/server-instances/server-1/client-managers/scum-client-manager",
|
||||
"GET /api/v1/server-instances/server-1/client-managers/example-client-manager",
|
||||
"POST /api/v1/server-instances/server-1/client-managers/deploy",
|
||||
"POST /api/v1/server-instances/server-1/client-managers/control",
|
||||
"POST /api/v1/server-instances/server-1/client-managers/update",
|
||||
|
||||
Reference in New Issue
Block a user