feat: lab2 done

This commit is contained in:
2026-10-09 15:48:03 +03:00
parent f743ee10a2
commit 575f8ee386
104 changed files with 7038 additions and 1099 deletions
+26
View File
@@ -0,0 +1,26 @@
meta {
name: Health live
type: http
seq: 1
}
get {
url: {{baseUrl}}/health/live
body: none
auth: none
}
docs {
Liveness процесса. Зависимости не проверяются: если API жив, ответ 200.
}
tests {
test("status 200", function() {
expect(res.status).to.equal(200);
});
test("X-Request-Id присутствует", function() {
expect(res.headers["x-request-id"]).to.be.a("string");
expect(res.headers["x-request-id"].length).to.be.greaterThan(0);
});
}
+26
View File
@@ -0,0 +1,26 @@
meta {
name: Health ready
type: http
seq: 2
}
get {
url: {{baseUrl}}/health/ready
body: none
auth: none
}
docs {
Readiness: 200 только если доступны PostgreSQL и Redis.
При остановленном Redis или PostgreSQL вернётся 503 в общем формате ошибки.
}
tests {
test("status 200", function() {
expect(res.status).to.equal(200);
});
test("status ok", function() {
expect(res.body.status).to.equal("ok");
});
}