Evenfire is an intelligence layer platform for running LLM agents that take real actions, on your infrastructure
TypeScript
test(hcc): restore the certification getter structurally, not per test
Alfredo Lopezf08594054de2
diff --git a/host-context-controller/package-lock.json b/host-context-controller/package-lock.jsonindex 4313781f8..e62679842 100644--- a/host-context-controller/package-lock.json+++ b/host-context-controller/package-lock.json@@ -1,12 +1,12 @@{"name": "clerum-host-context-controller",- "version": "0.1.197",+ "version": "0.1.198","lockfileVersion": 3,"requires": true,"packages": {"": {"name": "clerum-host-context-controller",- "version": "0.1.197",+ "version": "0.1.198","license": "SEE LICENSE IN LICENSE","dependencies": {"@clerum/image-policy": "file:../packages/image-policy",diff --git a/host-context-controller/package.json b/host-context-controller/package.jsonindex 36fe3f04e..2d46debfc 100644--- a/host-context-controller/package.json+++ b/host-context-controller/package.json@@ -1,6 +1,6 @@{"name": "clerum-host-context-controller",- "version": "0.1.197",+ "version": "0.1.198","description": "Host Context Controller - provides McpServer CRDs to mcp-host via REST API","main": "dist/main.js","engines": {diff --git a/host-context-controller/src/k8sClient.test.ts b/host-context-controller/src/k8sClient.test.tsindex 4dc67f44e..4e8ecb9d3 100644--- a/host-context-controller/src/k8sClient.test.ts+++ b/host-context-controller/src/k8sClient.test.ts@@ -356,6 +356,12 @@ describe('McpServerWatcher startup', () => {afterEach(() => {vi.useRealTimers()vi.restoreAllMocks()+ // Certified is the resting state. vi.clearAllMocks() in beforeEach clears+ // calls but not implementations, so a test that degrades this getter and+ // fails before its own restore would silently re-gate readiness for every+ // later test in the file. Restore it structurally rather than by+ // per-test discipline.+ mocks.hasCertifiedSafetyInventory.mockReset().mockReturnValue(true)mocks.ensureDefaultPolicies.mockReset().mockResolvedValue(undefined)mocks.netPolFullReconcile.mockReset().mockImplementation(async (...args: unknown[]) => {const options = args[2] as { onAuthoritativeRevocationComplete?: () => void } | undefined