PEP-129: tests follow the reworded messages
Co-Authored-By: Claude Fable 5.2 <noreply@anthropic.com>
This commit is contained in:
parent
7f28c29d10
commit
2677f1ad84
@ -206,7 +206,7 @@ describe("Claude: failures and recovery", () => {
|
||||
await tick(500);
|
||||
await p.waitStatus(sid, "stalled", 3000);
|
||||
const alert = await p.waitQuestion(sid, "attention");
|
||||
assert.match(alert.text, /не меняется/);
|
||||
assert.match(alert.text, /ничего не происходит/);
|
||||
await assert.rejects(runner.resumeSession(db, sid), /still running/);
|
||||
await runner.stopSession(db, sid);
|
||||
});
|
||||
|
||||
@ -155,7 +155,7 @@ describe("Деплой по окружениям", () => {
|
||||
assert.equal(prod[0]!.status, "healthy");
|
||||
assert.equal(prod[0]!.deployedBy, "mock-pm");
|
||||
assert.deepEqual(prod[0]!.tasks, [`${d.p.key}-7`]);
|
||||
await assert.rejects(runner.deployProd(db, d.proj, "mock-pm").then(() => runner.deployProd(db, d.proj, "mock-pm")), /уже выкатывается/);
|
||||
await assert.rejects(runner.deployProd(db, d.proj, "mock-pm").then(() => runner.deployProd(db, d.proj, "mock-pm")), /уже обновляется/);
|
||||
});
|
||||
|
||||
test("Telegram button: answering the staging message with «Выкатить в прод» starts prod", async () => {
|
||||
@ -254,7 +254,7 @@ describe("Проверка здоровья и откат", () => {
|
||||
assert.deepEqual(rel.tasks, [`${d.p.key}-2`], "only what was merged since the previous release");
|
||||
const msg = (await core.pendingQuestions(db, d.proj.id)).find((q) => q.text.includes(bad.slice(0, 7)) && q.text.includes("не прошло проверку"))!;
|
||||
assert.ok(msg, "the PM got a message");
|
||||
assert.match(msg.text, new RegExp(`возвращён ${good.slice(0, 7)}`));
|
||||
assert.match(msg.text, new RegExp(`возвращена прежняя версия ${good.slice(0, 7)}`));
|
||||
assert.match(msg.text, /Причина: проверка \/healthz/);
|
||||
assert.match(msg.text, new RegExp(`Подробности: ${gitea.url}/test/${d.proj.giteaRepo}/actions/runs/5`));
|
||||
assert.equal((await runner.currentReleases(db, d.proj.id)).prod?.sha, good);
|
||||
|
||||
@ -58,7 +58,7 @@ describe("Авто-перезапуск упавшего раннера", () =>
|
||||
await core.updateSession(db, sid, { watchState: { restarts: [Date.now() - 10 * MIN] } });
|
||||
await p.waitLog("crashed", (e) => e.ev === "exit");
|
||||
const q = await waitFor("question", async () => (await tickAt(new Date()), (await p.pending(sid)).find((q) => q.kind === "attention")));
|
||||
assert.match(q.text, /упал \(код 1\)/);
|
||||
assert.match(q.text, /работа оборвалась с ошибкой \(код 1\)/);
|
||||
assert.match(q.text, /авто-перезапуски исчерпаны \(1 за 24 ч\)/);
|
||||
assert.equal((await sess(sid)).watchState?.restartAt, undefined);
|
||||
});
|
||||
|
||||
Loading…
Reference in New Issue
Block a user