Fix local run freshness and plugin asset handling
This commit is contained in:
@@ -199,10 +199,25 @@ func TestCoreServiceDistributionBuildIgnoresStaleRunEndpoint(t *testing.T) {
|
||||
if err != nil {
|
||||
t.Fatalf("get runtime actions: %v", err)
|
||||
}
|
||||
if actions.RunStatus != domain.RunEndpointStatusOffline {
|
||||
t.Fatalf("stale Run endpoint must project offline runtime status, got %+v", actions)
|
||||
}
|
||||
staleRunGated := map[string]bool{"dependencies-check": false, "dependencies-install": false, "live-logs": false}
|
||||
for _, action := range actions.Actions {
|
||||
if action.Key == "generate-run" && !action.Available {
|
||||
t.Fatalf("stale Run endpoint must not gate platform build availability: %+v", action)
|
||||
}
|
||||
if _, gated := staleRunGated[action.Key]; gated {
|
||||
staleRunGated[action.Key] = true
|
||||
if action.Available || action.Reason != "Run heartbeat has not been observed" {
|
||||
t.Fatalf("stale Run endpoint must gate runtime action %s, got %+v", action.Key, action)
|
||||
}
|
||||
}
|
||||
}
|
||||
for key, seen := range staleRunGated {
|
||||
if !seen {
|
||||
t.Fatalf("expected stale Run gating action %s in %+v", key, actions.Actions)
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user