From a8b94ceffd2f0913298df55034685672c2dde2fa Mon Sep 17 00:00:00 2001 From: joshavant <830519+joshavant@users.noreply.github.com> Date: Wed, 12 Aug 2026 13:18:30 -0500 Subject: [PATCH] test(models): ignore private catalog load options --- .../models-list-result.openai-routes.test.ts | 25 ++++++++----------- 1 file changed, 11 insertions(+), 14 deletions(-) diff --git a/src/gateway/server-methods/models-list-result.openai-routes.test.ts b/src/gateway/server-methods/models-list-result.openai-routes.test.ts index 2d59c8727310..e7ab51e854e7 100644 --- a/src/gateway/server-methods/models-list-result.openai-routes.test.ts +++ b/src/gateway/server-methods/models-list-result.openai-routes.test.ts @@ -141,10 +141,9 @@ describe("models.list OpenAI routes", () => { catalogProjector: { evaluateEntry } as never, }), ).resolves.toEqual({ models: [] }); - expect(loadGatewayModelCatalogSnapshot).toHaveBeenCalledWith({ - agentId: "main", - readOnly: false, - }); + expect(loadGatewayModelCatalogSnapshot).toHaveBeenCalledWith( + expect.objectContaining({ agentId: "main", readOnly: false }), + ); expect(evaluateEntry).not.toHaveBeenCalled(); }); @@ -227,10 +226,9 @@ describe("models.list OpenAI routes", () => { }), ], }); - expect(context.loadGatewayModelCatalogSnapshot).toHaveBeenCalledWith({ - agentId: "worker", - readOnly: false, - }); + expect(context.loadGatewayModelCatalogSnapshot).toHaveBeenCalledWith( + expect.objectContaining({ agentId: "worker", readOnly: false }), + ); }); it("escalates full discovery using the replacement owner's agent", async () => { @@ -273,8 +271,8 @@ describe("models.list OpenAI routes", () => { await buildModelsListResult({ context, params: { view: "configured" } }); expect(loadGatewayModelCatalogSnapshot.mock.calls).toEqual([ - [{ agentId: "worker", readOnly: true }], - [{ agentId: "main", readOnly: false }], + [expect.objectContaining({ agentId: "worker", readOnly: true })], + [expect.objectContaining({ agentId: "main", readOnly: false })], ]); }); @@ -345,10 +343,9 @@ describe("models.list OpenAI routes", () => { await expect(buildModelsListResult({ context, params: { view: "all" } })).resolves.toEqual({ models: [], }); - expect(loadGatewayModelCatalogSnapshot).toHaveBeenCalledWith({ - agentId: "main", - readOnly: false, - }); + expect(loadGatewayModelCatalogSnapshot).toHaveBeenCalledWith( + expect.objectContaining({ agentId: "main", readOnly: false }), + ); }); it("does not project an ownerless catalog as the requested agent", async () => {