Compare commits
2 Commits
fix/matchm
...
staging
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
fd4dde1e5d | ||
|
|
aa3bfa9251 |
@@ -33,6 +33,12 @@ try {
|
||||
assert.ok(calls[0]?.url.endsWith("/a2a/tasks"));
|
||||
assert.equal(calls[0]?.headers.get("authorization"), config.a2aAllowedKey ? `Bearer ${config.a2aAllowedKey}` : null);
|
||||
|
||||
calls.length = 0;
|
||||
const sessionStartResponse = await app.request("http://backend.test/matchmaking/a2a", { method: "POST", headers: { "content-type": "application/json" }, body: JSON.stringify({ action: "session_start", params: { page: "job-matching" } }) });
|
||||
assert.equal(sessionStartResponse.status, 200);
|
||||
assert.equal(calls[0]?.body.action, "session_start");
|
||||
assert.equal(calls[0]?.body.session_start, true);
|
||||
|
||||
const forbiddenResponse = await app.request("http://backend.test/matchmaking/a2a", { method: "POST", headers: { "content-type": "application/json" }, body: JSON.stringify({ action: "force_forbidden" }) });
|
||||
assert.equal(forbiddenResponse.status, 502);
|
||||
assert.match(await forbiddenResponse.text(), /matchmaking service authentication failed/);
|
||||
|
||||
@@ -388,6 +388,7 @@ async function callMatchmakingA2a(body: Record<string, unknown>, userId: string)
|
||||
...body,
|
||||
action: action === "get_feed" ? "get_scout_feed" : action,
|
||||
user_id: getString(body.user_id) ?? userId,
|
||||
session_start: action === "session_start" || body.session_start === true,
|
||||
};
|
||||
const startedAt = Date.now();
|
||||
let res: Response;
|
||||
|
||||
Reference in New Issue
Block a user