test: fix various routes tests

* system/disks routes is gone
* provision routes now return 405 instead of 409 when re-setup/re-activated
This commit is contained in:
Girish Ramakrishnan
2024-06-03 19:18:36 +02:00
parent db7e88e302
commit 3dcd0975f7
4 changed files with 9 additions and 21 deletions

View File

@@ -115,9 +115,8 @@ async function update(id, task) {
debug(`update ${id}: ${JSON.stringify(task)}`);
let args = [ ];
let fields = [ ];
for (let k in task) {
const args = [], fields = [];
for (const k in task) {
if (k === 'result' || k === 'error') {
fields.push(`${k}Json = ?`);
args.push(JSON.stringify(task[k]));
@@ -244,7 +243,7 @@ async function listByTypePaged(type, page, perPage) {
assert.strictEqual(typeof page, 'number');
assert.strictEqual(typeof perPage, 'number');
let data = [];
const data = [];
let query = `SELECT ${TASKS_FIELDS} FROM tasks`;
if (type) {