Remove legacy steamcmd and SCUM runtime coupling
This commit is contained in:
@@ -51,7 +51,7 @@ func TestWorkerDistributionBuildCompilesAndUploadsRawRunExecutable(t *testing.T)
|
||||
TargetOS: runtime.GOOS,
|
||||
TargetArch: runtime.GOARCH,
|
||||
TargetRelease: "run-release-test",
|
||||
PlatformURL: "https://scum.npc0.com",
|
||||
PlatformURL: "https://platform.example.test",
|
||||
PackageFormat: "raw-executable",
|
||||
ArtifactID: "artifact-built-run",
|
||||
OutputFilename: output,
|
||||
@@ -85,7 +85,7 @@ func TestWorkerDistributionBuildCompilesAndUploadsRawRunExecutable(t *testing.T)
|
||||
if summary["status"] != "ok" || summary["mode"] != "smoke" {
|
||||
t.Fatalf("expected generated package to run smoke mode, got %+v", summary)
|
||||
}
|
||||
if summary["platformUrl"] != "https://scum.npc0.com" {
|
||||
if summary["platformUrl"] != "https://platform.example.test" {
|
||||
t.Fatalf("expected generated executable to use compiled platform URL, got %+v", summary)
|
||||
}
|
||||
joinedProgress := make([]string, 0, len(client.progressRequests))
|
||||
@@ -111,7 +111,7 @@ func TestWorkerDistributionBuildCrossCompilesWindowsAMD64Run(t *testing.T) {
|
||||
worker.state.SessionToken = "session-token"
|
||||
assignment := protocol.RunJobAssignment{JobID: "job-distribution-build-windows", ServerInstanceID: "server-build-windows", RunEndpointID: "run-builder", Capability: protocol.RunCapabilityDistributionBuild, TargetKey: "distribution/run", InputRef: "input://distribution-build/windows", IdempotencyKey: "distribution-build:windows", State: "running", LeaseToken: "lease-windows", Attempt: 1}
|
||||
client.claimJob = assignment
|
||||
client.buildInput = protocol.DistributionBuildInputResponse{JobID: assignment.JobID, ComponentKind: "run", ServerInstanceID: assignment.ServerInstanceID, PluginID: "game.scum", RunEndpointID: "server-run-server-build-windows", TargetOS: "windows", TargetArch: "amd64", TargetRelease: "run-release-windows", PlatformURL: "https://scum.npc0.com", PackageFormat: "raw-executable", ArtifactID: "artifact-built-windows-run", OutputFilename: "run.exe", SecretRef: "secret://runtime-keys/server-build-windows/run/current", KeyGeneration: 1, AuthKey: "test-component-key"}
|
||||
client.buildInput = protocol.DistributionBuildInputResponse{JobID: assignment.JobID, ComponentKind: "run", ServerInstanceID: assignment.ServerInstanceID, PluginID: "game.scum", RunEndpointID: "server-run-server-build-windows", TargetOS: "windows", TargetArch: "amd64", TargetRelease: "run-release-windows", PlatformURL: "https://platform.example.test", PackageFormat: "raw-executable", ArtifactID: "artifact-built-windows-run", OutputFilename: "run.exe", SecretRef: "secret://runtime-keys/server-build-windows/run/current", KeyGeneration: 1, AuthKey: "test-component-key"}
|
||||
|
||||
result := worker.executeDistributionBuild(context.Background(), assignment)
|
||||
if result.State != lifecycleResultStateSucceeded || result.ResultRef != "artifact://artifact-built-windows-run" {
|
||||
@@ -135,7 +135,7 @@ func TestDistributionBuildIsolationUsesPluginJobWorkspaceAndDistinctPackageState
|
||||
ProfileKey: "run-local",
|
||||
TargetOS: "linux",
|
||||
TargetArch: "amd64",
|
||||
PlatformURL: "https://scum.npc0.com",
|
||||
PlatformURL: "https://platform.example.test",
|
||||
PackageFormat: "raw-executable",
|
||||
ArtifactID: "artifact-run-dist-scum-alpha",
|
||||
OutputFilename: "run",
|
||||
@@ -158,8 +158,8 @@ func TestDistributionBuildIsolationUsesPluginJobWorkspaceAndDistinctPackageState
|
||||
if filepath.Dir(firstWorkspace) != filepath.Dir(secondWorkspace) || filepath.Base(filepath.Dir(firstWorkspace)) != "game-scum" {
|
||||
t.Fatalf("expected workspaces under the same plugin queue directory, first=%s second=%s", firstWorkspace, secondWorkspace)
|
||||
}
|
||||
firstFlags := buildRunLDFlags(firstInput, "https://scum.npc0.com")
|
||||
secondFlags := buildRunLDFlags(secondInput, "https://scum.npc0.com")
|
||||
firstFlags := buildRunLDFlags(firstInput, "https://platform.example.test")
|
||||
secondFlags := buildRunLDFlags(secondInput, "https://platform.example.test")
|
||||
if !strings.Contains(firstFlags, "BuildServerInstanceID=scum-alpha") || !strings.Contains(firstFlags, "BuildRegistrationToken=alpha-component-key") {
|
||||
t.Fatalf("expected first build flags to carry first server identity, got %q", firstFlags)
|
||||
}
|
||||
@@ -255,7 +255,7 @@ func TestValidateDistributionBuildInputRejectsLegacyClientManagerBuilds(t *testi
|
||||
|
||||
func TestValidateDistributionBuildInputAllowsDedicatedRunIdentity(t *testing.T) {
|
||||
assignment := protocol.RunJobAssignment{JobID: "job-build", ServerInstanceID: "server-build", RunEndpointID: "run-local-debug"}
|
||||
input := protocol.DistributionBuildInputResponse{JobID: assignment.JobID, ComponentKind: "run", ServerInstanceID: assignment.ServerInstanceID, RunEndpointID: "server-run-server-build", PluginID: "game.scum", TargetOS: "windows", TargetArch: "amd64", TargetRelease: "release-1", PlatformURL: "https://scum.npc0.com", PackageFormat: "raw-executable", ArtifactID: "artifact-build", OutputFilename: "run.exe", AuthKey: "key"}
|
||||
input := protocol.DistributionBuildInputResponse{JobID: assignment.JobID, ComponentKind: "run", ServerInstanceID: assignment.ServerInstanceID, RunEndpointID: "server-run-server-build", PluginID: "game.scum", TargetOS: "windows", TargetArch: "amd64", TargetRelease: "release-1", PlatformURL: "https://platform.example.test", PackageFormat: "raw-executable", ArtifactID: "artifact-build", OutputFilename: "run.exe", AuthKey: "key"}
|
||||
if err := validateDistributionBuildInput(assignment, input); err != nil {
|
||||
t.Fatalf("dedicated Run identity must be accepted for a builder job: %v", err)
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user