Pulse/internal/mock
rcourtman 802b3aac49
Some checks are pending
Build and Test / Secret Scan (push) Waiting to run
Build and Test / Frontend & Backend (push) Waiting to run
Fix VMware inventory metric clone race and exempt docker-swarm-node from legacy-host-label assertion
Two real bugs that surfaced once the 20m test timeout let the
internal/api and internal/monitoring packages run to completion.

cloneVMwareInventoryMetrics omitted four fields:

Commit 23ea4e487 (Surface vSphere VM uptime and guest disk usage)
added UptimeSeconds, DiskUsedBytes, DiskTotalBytes, and DiskPercent
to vmware.InventoryMetrics but did not extend
cloneVMwareInventoryMetrics. The clone left those pointer fields
aliased to the source struct, so the mock fixture refresh path
(refreshVMwareInventoryMetrics writing through metrics.UptimeSeconds
via ensureInt64Ptr) and the snapshot read path
(inventoryUptimeSeconds dereferencing metrics.UptimeSeconds) raced
on the same heap-allocated int64.

TestMonitorBuildBroadcastFrontendStateUsesCanonicalMockUnifiedResources
exemption:

The test asserts broadcast state does not publish the lowercase-
hyphenated legacy docker host label so canonical docker hosts
surface their human-readable DisplayName. Commit 89abed099
(2026-05-24) added the docker-swarm-node resource type whose Name
is the swarm node hostname (matching how Docker Swarm identifies
node members), which collided with the legacy-label rejection.
Refine the assertion to apply only to host-type resources
(docker-host, agent, node).
2026-05-27 17:47:09 +01:00
..
alert_history.go Make fixture graph the only mock runtime API 2026-03-31 15:42:16 +01:00
availability_fixtures.go Classify agentless machine availability targets 2026-05-25 21:38:43 +01:00
canonical_api_guardrails_test.go Make fixture graph the only mock runtime API 2026-03-31 15:42:16 +01:00
config_validation.go Make demo mock cadence configurable 2026-04-11 13:50:38 +01:00
config_validation_test.go Make demo mock cadence configurable 2026-04-11 13:50:38 +01:00
demo_scenarios.go Add Kubernetes RBAC inventory to the agent + canonical + UI 2026-05-25 09:25:03 +01:00
demo_scenarios_test.go Add Kubernetes RBAC inventory to the agent + canonical + UI 2026-05-25 09:25:03 +01:00
discovery_fixtures.go Tighten Discovery drawer signal 2026-05-20 15:55:19 +01:00
discovery_fixtures_test.go Seed mock Discovery fixtures 2026-05-20 14:54:19 +01:00
env_dev.go Gate release mock fixtures behind demo entitlement 2026-04-10 12:33:57 +01:00
env_release.go Gate release mock fixtures behind demo entitlement 2026-04-10 12:33:57 +01:00
fixture_graph.go Fix VMware inventory metric clone race and exempt docker-swarm-node from legacy-host-label assertion 2026-05-27 17:47:09 +01:00
generator.go Expose Docker and Kubernetes API tab fields 2026-05-24 18:47:55 +01:00
generator_helpers_coverage_test.go feat: Pulse v6 release 2026-03-18 16:06:30 +00:00
generator_test.go Expose Docker and Kubernetes API tab fields 2026-05-24 18:47:55 +01:00
integration.go Stabilize RC release backend race proofs 2026-04-11 23:18:44 +01:00
integration_additional_test.go Make demo mock cadence configurable 2026-04-11 13:50:38 +01:00
integration_concurrency_test.go Make demo mock cadence configurable 2026-04-11 13:50:38 +01:00
integration_coverage_test.go Make demo mock cadence configurable 2026-04-11 13:50:38 +01:00
integration_release_test.go Gate release mock fixtures behind demo entitlement 2026-04-10 12:33:57 +01:00
integration_security_test.go Make demo mock cadence configurable 2026-04-11 13:50:38 +01:00
integration_shutdown_test.go feat: Pulse v6 release 2026-03-18 16:06:30 +00:00
integration_test.go Make demo mock cadence configurable 2026-04-11 13:50:38 +01:00
metric_personas.go Scope TrueNAS resources by appliance 2026-05-21 00:59:00 +01:00
metric_runtime.go Sharpen mock summary isolation and role shaping 2026-04-01 12:21:36 +01:00
platform_fixtures.go Surface vSphere VM uptime and guest disk usage 2026-05-23 10:07:21 +01:00
platform_fixtures_test.go Seed native platform tab fixtures 2026-05-24 13:16:00 +01:00
platform_support_contract_test.go Consolidate container and Kubernetes platform tabs 2026-05-24 19:20:14 +01:00
recovery_points.go Curate canonical mock demo scenarios 2026-04-01 12:54:04 +01:00
recovery_points_test.go Tighten platform overview IA 2026-05-24 19:41:29 +01:00
truenas_metrics_identity.go Scope TrueNAS resources by appliance 2026-05-21 00:59:00 +01:00