Remove legacy steamcmd and SCUM runtime coupling

This commit is contained in:
npc0-hue
2026-09-04 12:37:39 +08:00
parent 26c07e232d
commit a695aafd0f
16 changed files with 113 additions and 91 deletions
+9
View File
@@ -34,6 +34,15 @@ func TestValidateRunAutonomousLifecyclePlanRejectsUnsafeDataTargets(t *testing.T
}
}
func TestValidateRunAutonomousLifecyclePlanRejectsLegacySteamCMDAppStep(t *testing.T) {
plan := validAutonomousLifecyclePlanForTest()
plan.InstallPlans = []DependencyInstallPlan{{Key: "install-game", Title: "Install game", Steps: []DependencyInstallStep{{Type: "steamcmd-app", TargetKey: "server/install-root", PackageManager: "steamcmd", PackageName: "123456"}}}}
if err := ValidateRunAutonomousLifecyclePlan(plan); err == nil {
t.Fatal("expected legacy steamcmd-app install step to be rejected")
}
}
func validAutonomousLifecyclePlanForTest() RunAutonomousLifecyclePlan {
return RunAutonomousLifecyclePlan{SchemaVersion: "1", ServerInstanceID: "server-1", PluginID: "game.example", PluginVersion: "1.0.0", RunEndpointID: "run-1", ProfileKey: "run-local", TargetOS: "windows", TargetArch: "amd64", TargetRelease: "release-1", Bootstrap: &RunAutonomousLifecycleAction{Action: "start", Operation: "start", Capability: RunCapabilityProcessStart, TargetKey: "actions/start.json"}}
}