Skip to content

armgit / Pulse

Public Imported from GitHub
0

Real-time monitoring dashboard for Proxmox VE, PBS, Docker, Kubernetes, TrueNAS and vSphere. Self-hosted, with alerts for failed backups, full disks, unhealthy containers and offline nodes.

test(go): stamp parity storage fixture LastSeen; raise CI go test timeout

rcourtmana405bfc7e87a
diff --git a/.github/workflows/build-and-test.yml b/.github/workflows/build-and-test.yml
index 53e09b0c1d..779993af1c 100644
--- a/.github/workflows/build-and-test.yml
+++ b/.github/workflows/build-and-test.yml
@@ -89,7 +89,9 @@ jobs:
- name: Go unit tests
env:
PULSE_DATA_DIR: /tmp/pulse-test-data
- run: go test -race -timeout 10m ./...
+ # internal/api alone takes ~10m under -race on a fast machine; CI
+ # runners need the larger per-binary budget.
+ run: go test -race -timeout 25m ./...
- name: Go benchmarks
env:
diff --git a/internal/ai/parity_test.go b/internal/ai/parity_test.go
index 7e949aa58c..6d93e5760c 100644
--- a/internal/ai/parity_test.go
+++ b/internal/ai/parity_test.go
@@ -468,6 +468,7 @@ func TestParityStorageFields(t *testing.T) {
Instance: "pve",
Type: "zfspool",
Status: "online",
+ LastSeen: now,
Path: "/tank",
Total: 107374182400,
Used: 10737418240,
@@ -521,7 +522,7 @@ func TestParityStorageFields(t *testing.T) {
require.Equal(t, storage.Used, v.DiskUsed())
require.Equal(t, storage.Total, v.DiskTotal())
require.InEpsilon(t, percentFromUsage(storage.Usage), v.DiskPercent(), 1e-9)
- require.NotZero(t, v.LastSeen())
+ require.True(t, v.LastSeen().Equal(storage.LastSeen))
}
func TestParityPBSInstanceFields(t *testing.T) {