mirror of
https://github.com/ether/etherpad-lite.git
synced 2025-04-21 16:06:16 -04:00
tests: Simplify API key reading
Also delete unused imports.
This commit is contained in:
parent
ce0b151159
commit
048bd0f50d
12 changed files with 29 additions and 67 deletions
|
@ -1,14 +1,11 @@
|
|||
var assert = require('assert')
|
||||
supertest = require(__dirname+'/../../../../src/node_modules/supertest'),
|
||||
fs = require('fs'),
|
||||
settings = require(__dirname + '/../../../../src/node/utils/Settings'),
|
||||
api = supertest('http://'+settings.ip+":"+settings.port),
|
||||
path = require('path');
|
||||
function m(mod) { return __dirname + '/../../../../src/' + mod; }
|
||||
|
||||
var filePath = path.join(__dirname, '../../../../APIKEY.txt');
|
||||
const common = require('../../common');
|
||||
const settings = require(m('node/utils/Settings'));
|
||||
const supertest = require(m('node_modules/supertest'));
|
||||
|
||||
var apiKey = fs.readFileSync(filePath, {encoding: 'utf-8'});
|
||||
apiKey = apiKey.replace(/\n$/, "");
|
||||
const api = supertest(`http://${settings.ip}:${settings.port}`);
|
||||
const apiKey = common.apiKey;
|
||||
var apiVersion = 1;
|
||||
var authorID = "";
|
||||
var padID = makeid();
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue