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.

Reconcile Docker guide assertions with published main

pulse-triage[bot]bcb38f5df797
diff --git a/frontend-modern/src/features/docs/__tests__/dockerUpdateGuide.test.ts b/frontend-modern/src/features/docs/__tests__/dockerUpdateGuide.test.ts
index e1544052fc..50217f4056 100644
--- a/frontend-modern/src/features/docs/__tests__/dockerUpdateGuide.test.ts
+++ b/frontend-modern/src/features/docs/__tests__/dockerUpdateGuide.test.ts
@@ -53,14 +53,12 @@ describe('shipped monitored-container update guide', () => {
'utf8',
);
expect(registry).toMatch(/defaultCacheTTL\s*=\s*6\s*\*\s*time.Hour/);
- // A changed local image can now bypass old evidence through the bounded
- // refresh helper. Bind the clock assertion to the remaining cache-hit
- // branch, not the unconditional lookup that preceded that correction.
- expect(registry).toContain('cached, refresh := r.cachedForLocalImage(cacheKey, currentDigest)');
- const cacheHit = registry
- .split('if cached != nil && !refresh {')[1]
- ?.split('// Fetch latest digest from registry')[0];
- expect(cacheHit, 'the guarded cache-hit branch must remain inspectable').toBeDefined();
+ // Local replacements now go through the shared refresh selector. Keep
+ // checking the reusable-cache branch, not the superseded getCached call.
+ const cacheHit = registry.match(
+ /cached, refresh := r\.cachedForLocalImage\(cacheKey, currentDigest\)\s+if cached != nil && !refresh \{([\s\S]*?)\n\t\}/,
+ )?.[1];
+ expect(cacheHit, 'missing reusable registry-cache branch').toBeDefined();
expect(cacheHit).toMatch(/LatestDigest:\s+cached.latestDigest/);
expect(cacheHit).toMatch(/CheckedAt:\s+time.Now\(\)/);
expect(collector).toMatch(/LastChecked:\s+result.CheckedAt/);