tests: Simplify API key reading

Also delete unused imports.
This commit is contained in:
Richard Hansen 2020-10-08 01:37:17 -04:00 committed by John McLear
parent ce0b151159
commit 048bd0f50d
12 changed files with 29 additions and 67 deletions

View file

@ -1,13 +1,10 @@
const assert = require('assert').strict;
const common = require('../../common');
const supertest = require(__dirname + '/../../../../src/node_modules/supertest');
const fs = require('fs');
const settings = require(__dirname + '/../../../../src/node/utils/Settings');
const api = supertest(`http://${settings.ip}:${settings.port}`);
const path = require('path');
const filePath = path.join(__dirname, '../../../../APIKEY.txt');
const apiKey = fs.readFileSync(filePath, {encoding: 'utf-8'}).replace(/\n$/, '');
const apiKey = common.apiKey;
let apiVersion = 1;
let groupID = '';
let authorID = '';