Evenfire is an intelligence layer platform for running LLM agents that take real actions, on your infrastructure
TypeScript
test(control-api): tighten e2e mirror guard to per-arm slot resolution
Diego Zacarias6a3a241fb2db
diff --git a/control-api/package-lock.json b/control-api/package-lock.jsonindex 17b2019f2..0ab6b5a06 100644--- a/control-api/package-lock.json+++ b/control-api/package-lock.json@@ -1,12 +1,12 @@{"name": "clerum-control-api",- "version": "0.1.472",+ "version": "0.1.473","lockfileVersion": 3,"requires": true,"packages": {"": {"name": "clerum-control-api",- "version": "0.1.472",+ "version": "0.1.473","dependencies": {"@clerum/display-field": "file:../packages/display-field","@clerum/image-policy": "file:../packages/image-policy",diff --git a/control-api/package.json b/control-api/package.jsonindex 4a5a57da1..1470b0b85 100644--- a/control-api/package.json+++ b/control-api/package.json@@ -1,6 +1,6 @@{"name": "clerum-control-api",- "version": "0.1.472",+ "version": "0.1.473","description": "Internal Clerum control plane REST API + UI for managing CRDs and secrets","main": "dist/main.js","engines": {diff --git a/control-api/test/llmProviderMirrors.test.ts b/control-api/test/llmProviderMirrors.test.tsindex b08519790..a5ea8f9d7 100644--- a/control-api/test/llmProviderMirrors.test.ts+++ b/control-api/test/llmProviderMirrors.test.ts@@ -37,11 +37,20 @@ describe('hand-maintained provider mirrors (shell scripts)', () => {it('both e2e scripts have a provider->slot case arm for every provider', () => {const scripts = ['scripts/e2e/e2e-plugin-workload-sdk.sh', 'scripts/e2e/seed-e2e-data.sh']for (const rel of scripts) {- const script = read(rel)+ // These scripts have more than one `case` over providers (a model-name+ // block and a credential-slot block), so match on the arm LINES, not the+ // whole file: at least one `id)` arm must resolve this provider's slot.+ // That catches an absent arm and a mis-wired one, while tolerating the+ // multiple case blocks.+ const lines = read(rel).split('\n')for (const id of PROVIDER_IDS) {const primarySlot = PROVIDER_CREDENTIAL_SLOTS[id][0].dataKey- expect(script, `${rel}: missing case arm ${id})`).toContain(`${id})`)- expect(script, `${rel}: ${id}) arm must resolve ${primarySlot}`).toContain(primarySlot)+ const idArms = lines.filter(line => line.trimStart().startsWith(`${id})`))+ expect(idArms.length, `${rel}: missing case arm ${id})`).toBeGreaterThan(0)+ expect(+ idArms.some(arm => arm.includes(primarySlot)),+ `${rel}: no ${id}) arm resolves ${primarySlot}`+ ).toBe(true)}}})