@@ -258,9 +258,9 @@ describe("scripts/e2e/openwebui-probe.mjs", () => {
|
258 | 258 | if (request.url === "/api/v1/auths/signin") { |
259 | 259 | response.writeHead(200, { |
260 | 260 | "content-type": "application/json", |
261 | | -"set-cookie": "openwebui-session=test; Path=/", |
| 261 | +"set-cookie": "openwebui-session=chat=secret=cookie; Path=/", |
262 | 262 | }); |
263 | | -response.end(JSON.stringify({ token: "test-token" })); |
| 263 | +response.end(JSON.stringify({ token: "chat-secret-token" })); |
264 | 264 | return; |
265 | 265 | } |
266 | 266 | if (request.url === "/api/models") { |
@@ -329,9 +329,9 @@ describe("scripts/e2e/openwebui-probe.mjs", () => {
|
329 | 329 | if (request.url === "/api/v1/auths/signin") { |
330 | 330 | response.writeHead(200, { |
331 | 331 | "content-type": "application/json", |
332 | | -"set-cookie": "openwebui-session=test; Path=/", |
| 332 | +"set-cookie": "openwebui-session=chat=secret=cookie; Path=/", |
333 | 333 | }); |
334 | | -response.end(JSON.stringify({ token: "test-token" })); |
| 334 | +response.end(JSON.stringify({ token: "chat-secret-token" })); |
335 | 335 | return; |
336 | 336 | } |
337 | 337 | if (request.url === "/api/models") { |
@@ -461,8 +461,16 @@ describe("scripts/e2e/openwebui-probe.mjs", () => {
|
461 | 461 | return; |
462 | 462 | } |
463 | 463 | if (request.url === "/api/chat/completions") { |
| 464 | +const authorization = request.headers.authorization ?? ""; |
| 465 | +const cookie = request.headers.cookie ?? ""; |
464 | 466 | response.writeHead(200, { "content-type": "application/json" }); |
465 | | -response.end(JSON.stringify({ message: { content: "missing the marker" } })); |
| 467 | +response.end( |
| 468 | +JSON.stringify({ |
| 469 | +message: { |
| 470 | +content: `missing the marker with ${authorization} and ${cookie}`, |
| 471 | +}, |
| 472 | +}), |
| 473 | +); |
466 | 474 | return; |
467 | 475 | } |
468 | 476 | response.writeHead(404).end(); |
@@ -473,7 +481,11 @@ describe("scripts/e2e/openwebui-probe.mjs", () => {
|
473 | 481 | |
474 | 482 | expect(result.error).toBeUndefined(); |
475 | 483 | expect(result.status).not.toBe(0); |
476 | | -expect(result.stderr).toContain('chat reply missing nonce: "missing the marker"'); |
| 484 | +expect(result.stderr).toContain("chat reply missing nonce"); |
| 485 | +expect(result.stderr).toContain("<redacted>"); |
| 486 | +expect(result.stderr).not.toContain("chat-secret-token"); |
| 487 | +expect(result.stderr).not.toContain("chat=secret=cookie"); |
| 488 | +expect(result.stderr).not.toContain("openwebui-session=chat"); |
477 | 489 | } finally { |
478 | 490 | server.close(); |
479 | 491 | } |
|