mirror of
https://github.com/ajayyy/SponsorBlockServer.git
synced 2025-12-07 20:17:02 +03:00
add loadAvg to status
This commit is contained in:
@@ -19,6 +19,7 @@ describe("getStatus", () => {
|
||||
assert.strictEqual(data.db, Number(dbVersion));
|
||||
assert.ok(data.startTime);
|
||||
assert.ok(data.processTime >= 0);
|
||||
assert.ok(data.loadavg.length == 2);
|
||||
done();
|
||||
})
|
||||
.catch(err => done(err));
|
||||
@@ -74,4 +75,16 @@ describe("getStatus", () => {
|
||||
})
|
||||
.catch(err => done(err));
|
||||
});
|
||||
|
||||
it("Should be able to get loadavg only", (done) => {
|
||||
client.get(`${endpoint}/loadavg`)
|
||||
.then(res => {
|
||||
console.log(res.data);
|
||||
assert.strictEqual(res.status, 200);
|
||||
assert.ok(Number(res.data[0]) >= 0);
|
||||
assert.ok(Number(res.data[1]) >= 0);
|
||||
done();
|
||||
})
|
||||
.catch(err => done(err));
|
||||
});
|
||||
});
|
||||
|
||||
Reference in New Issue
Block a user