mirror of
https://github.com/rcourtman/Pulse.git
synced 2026-10-24 04:33:17 +00:00
Keep canonical broadcast guard aligned with borrowed inputs
The connected suite retained a shared-contract source assertion expecting by-value helper calls. The converter now borrows its local resource and dereferences at the same shared canonical type/name/cluster APIs. Match those three exact expressions without removing a shared-helper assertion or changing runtime behavior. Contract-Neutral: Source-structure verification only; the same canonical shared helper, REST/state contract and all runtime payload and freshness behavior remain required. Change-source: pulse-maintainer
This commit is contained in:
@@ -1463,7 +1463,7 @@ func TestRootCauseEngineUsesCanonicalRelationshipModel(t *testing.T) {
|
||||
func TestResourceDisplayNameUsedByInfrastructureConsumers(t *testing.T) {
|
||||
requiredSnippets := map[string][]string{
|
||||
filepath.Join("..", "monitoring", "connected_infrastructure.go"): {
|
||||
"unifiedresources.ResourceDisplayName(resource)",
|
||||
"unifiedresources.ResourceDisplayName(*resource)",
|
||||
},
|
||||
filepath.Join(".", "monitored_systems.go"): {
|
||||
"if name := ResourceDisplayName(*resource); name != \"\" {",
|
||||
@@ -2695,9 +2695,9 @@ func TestBroadcastStateUsesSharedCanonicalResourceContract(t *testing.T) {
|
||||
|
||||
requiredMonitorSnippets := []string{
|
||||
"unifiedView := m.currentUnifiedStateView()",
|
||||
"return string(unifiedresources.ContractResourceType(resource))",
|
||||
"unifiedresources.ResourceDisplayName(resource)",
|
||||
"unifiedresources.ResourceClusterName(resource)",
|
||||
"return string(unifiedresources.ContractResourceType(*resource))",
|
||||
"unifiedresources.ResourceDisplayName(*resource)",
|
||||
"unifiedresources.ResourceClusterName(*resource)",
|
||||
}
|
||||
for _, snippet := range requiredMonitorSnippets {
|
||||
if !strings.Contains(string(monitorSource), snippet) {
|
||||
|
||||
Reference in New Issue
Block a user