fix: 半成品契约和 SCUM manifest
This commit is contained in:
@@ -338,7 +338,7 @@ func autonomousLogSource(source domain.RuntimeLogSource) domain.RunAutonomousLog
|
|||||||
}
|
}
|
||||||
|
|
||||||
func autonomousRunLogSourceKind(kind string) bool {
|
func autonomousRunLogSourceKind(kind string) bool {
|
||||||
return kind == "process.stdout" || kind == "process.stderr" || kind == "file.tail"
|
return kind == "process.stdout" || kind == "process.stderr"
|
||||||
}
|
}
|
||||||
|
|
||||||
func autonomousDLLExtension(extension domain.RuntimeDLLExtensionPlan) domain.RunAutonomousDLLExtension {
|
func autonomousDLLExtension(extension domain.RuntimeDLLExtensionPlan) domain.RunAutonomousDLLExtension {
|
||||||
|
|||||||
@@ -145,9 +145,12 @@ func TestCoreServiceKeepsPlatformBuildKeyOffMachineJobChannel(t *testing.T) {
|
|||||||
if plan == nil || plan.SchemaVersion != "1" || plan.ServerInstanceID != instance.ID || plan.PluginID != plugin.ID || plan.ProfileKey != "local" || plan.Bootstrap == nil || plan.Bootstrap.Action != domain.ServerLifecycleActionStart || plan.Bootstrap.TargetKey != "actions/start.json" {
|
if plan == nil || plan.SchemaVersion != "1" || plan.ServerInstanceID != instance.ID || plan.PluginID != plugin.ID || plan.ProfileKey != "local" || plan.Bootstrap == nil || plan.Bootstrap.Action != domain.ServerLifecycleActionStart || plan.Bootstrap.TargetKey != "actions/start.json" {
|
||||||
t.Fatalf("platform builder received incomplete autonomous lifecycle plan: %+v", plan)
|
t.Fatalf("platform builder received incomplete autonomous lifecycle plan: %+v", plan)
|
||||||
}
|
}
|
||||||
if len(plan.DependencyProbes) != 1 || plan.DependencyProbes[0].Key != "java-runtime" || len(plan.InstallPlans) != 1 || plan.InstallPlans[0].Key != "java-install" || len(plan.LogSources) != 3 || !hasAutonomousLogSource(plan.LogSources, "process.stdout", "console") || !hasAutonomousLogSource(plan.LogSources, "file.tail", "latest-log") || !hasAutonomousLogSource(plan.LogSources, "file.tail", "scum.server") || plan.RuntimeBindings["logs/latest"] != "runtime.logs.latest" {
|
if len(plan.DependencyProbes) != 1 || plan.DependencyProbes[0].Key != "java-runtime" || len(plan.InstallPlans) != 1 || plan.InstallPlans[0].Key != "java-install" || len(plan.LogSources) != 1 || !hasAutonomousLogSource(plan.LogSources, "process.stdout", "console") || plan.RuntimeBindings["logs/latest"] != "runtime.logs.latest" {
|
||||||
t.Fatalf("autonomous lifecycle plan lost plugin runtime declarations: %+v", plan)
|
t.Fatalf("autonomous lifecycle plan lost plugin runtime declarations: %+v", plan)
|
||||||
}
|
}
|
||||||
|
if hasAutonomousLogSource(plan.LogSources, "file.tail", "latest-log") || hasAutonomousLogSource(plan.LogSources, "file.tail", "scum.server") {
|
||||||
|
t.Fatalf("autonomous lifecycle plan must not carry file-tail sources into process.start: %+v", plan.LogSources)
|
||||||
|
}
|
||||||
var seededPlan domain.RunAutonomousLifecyclePlan
|
var seededPlan domain.RunAutonomousLifecyclePlan
|
||||||
if err := json.Unmarshal([]byte(seedFiles[2].Content), &seededPlan); err != nil {
|
if err := json.Unmarshal([]byte(seedFiles[2].Content), &seededPlan); err != nil {
|
||||||
t.Fatalf("unmarshal seeded autonomous lifecycle plan: %v", err)
|
t.Fatalf("unmarshal seeded autonomous lifecycle plan: %v", err)
|
||||||
|
|||||||
Reference in New Issue
Block a user