Compare commits

...

1 Commits

Author SHA1 Message Date
diegosouzapw
7918593857 fix(tests): align model-sync log assertion to shipped path redaction (base-red)
tests/unit/model-sync-route.test.ts expected the persisted call-log error to be
'Invalid JSON response from /models', but the call-log write now runs the error
through sanitizeErrorForLog -> errorPathRedaction, which redacts the path to
<path> for stored logs (defense in depth for exported call logs). The live API
response to the caller is unchanged (body.error still /models); only the
persisted logs[0].error is redacted. Align the log assertion to the shipped
behavior; body.error assertion stays /models.

No production change — test alignment to an already-merged redaction. Refs base-red #12732.
2026-09-10 11:47:45 -03:00

View File

@@ -302,7 +302,7 @@ test("model sync route reports invalid JSON /models responses without losing ups
assert.equal(body.upstreamStatus, 200);
assert.equal(logs.length, 1);
assert.equal(logs[0].status, 200);
assert.equal(logs[0].error, "Invalid JSON response from /models");
assert.equal(logs[0].error, "Invalid JSON response from <path>");
});
test("model sync route preserves previously synced models when the upstream omits the models list", async () => {