-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathget.test.js
More file actions
23 lines (18 loc) · 812 Bytes
/
get.test.js
File metadata and controls
23 lines (18 loc) · 812 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
import orchestrator from "tests/orchestrator.js";
beforeAll(async () => {
await orchestrator.waitForAllServices();
});
describe("GET to api/v1/status", () => {
describe("Anonymous user", () => {
test("Getting system status", async () => {
const response = await fetch("http://localhost:3000/api/v1/status");
const responseBody = await response.json();
const parsedUpdatedAt = new Date(responseBody.updated_at).toISOString();
expect(response.status).toBe(200);
expect(responseBody.updated_at).toEqual(parsedUpdatedAt);
expect(responseBody.dependencies.database.version).toEqual("16.0");
expect(responseBody.dependencies.database.max_connections).toEqual(100);
expect(responseBody.dependencies.database.opened_connections).toEqual(1);
});
});
});