mirror of
https://github.com/ether/etherpad-lite.git
synced 2025-04-21 07:56:16 -04:00
tests: Remove overly aggressive timeouts
This commit is contained in:
parent
90a2b553d1
commit
39a971e3b9
3 changed files with 0 additions and 37 deletions
|
@ -21,7 +21,6 @@ describe(__filename, function () {
|
||||||
|
|
||||||
describe('Connectivity For Character Encoding', function () {
|
describe('Connectivity For Character Encoding', function () {
|
||||||
it('can connect', function (done) {
|
it('can connect', function (done) {
|
||||||
this.timeout(250);
|
|
||||||
agent.get('/api/')
|
agent.get('/api/')
|
||||||
.expect('Content-Type', /json/)
|
.expect('Content-Type', /json/)
|
||||||
.expect(200, done);
|
.expect(200, done);
|
||||||
|
@ -29,7 +28,6 @@ describe(__filename, function () {
|
||||||
});
|
});
|
||||||
|
|
||||||
describe('API Versioning', function () {
|
describe('API Versioning', function () {
|
||||||
this.timeout(150);
|
|
||||||
it('finds the version tag', function (done) {
|
it('finds the version tag', function (done) {
|
||||||
agent.get('/api/')
|
agent.get('/api/')
|
||||||
.expect((res) => {
|
.expect((res) => {
|
||||||
|
@ -43,7 +41,6 @@ describe(__filename, function () {
|
||||||
|
|
||||||
describe('Permission', function () {
|
describe('Permission', function () {
|
||||||
it('errors with invalid APIKey', function (done) {
|
it('errors with invalid APIKey', function (done) {
|
||||||
this.timeout(150);
|
|
||||||
// This is broken because Etherpad doesn't handle HTTP codes properly see #2343
|
// This is broken because Etherpad doesn't handle HTTP codes properly see #2343
|
||||||
// If your APIKey is password you deserve to fail all tests anyway
|
// If your APIKey is password you deserve to fail all tests anyway
|
||||||
const permErrorURL = `/api/${apiVersion}/createPad?apikey=password&padID=test`;
|
const permErrorURL = `/api/${apiVersion}/createPad?apikey=password&padID=test`;
|
||||||
|
@ -54,7 +51,6 @@ describe(__filename, function () {
|
||||||
|
|
||||||
describe('createPad', function () {
|
describe('createPad', function () {
|
||||||
it('creates a new Pad', function (done) {
|
it('creates a new Pad', function (done) {
|
||||||
this.timeout(150);
|
|
||||||
agent.get(`${endPoint('createPad')}&padID=${testPadId}`)
|
agent.get(`${endPoint('createPad')}&padID=${testPadId}`)
|
||||||
.expect((res) => {
|
.expect((res) => {
|
||||||
if (res.body.code !== 0) throw new Error('Unable to create new Pad');
|
if (res.body.code !== 0) throw new Error('Unable to create new Pad');
|
||||||
|
@ -66,7 +62,6 @@ describe(__filename, function () {
|
||||||
|
|
||||||
describe('setHTML', function () {
|
describe('setHTML', function () {
|
||||||
it('Sets the HTML of a Pad attempting to weird utf8 encoded content', function (done) {
|
it('Sets the HTML of a Pad attempting to weird utf8 encoded content', function (done) {
|
||||||
this.timeout(1000);
|
|
||||||
fs.readFile('tests/backend/specs/api/emojis.html', 'utf8', (err, html) => {
|
fs.readFile('tests/backend/specs/api/emojis.html', 'utf8', (err, html) => {
|
||||||
agent.post(endPoint('setHTML'))
|
agent.post(endPoint('setHTML'))
|
||||||
.send({
|
.send({
|
||||||
|
@ -84,7 +79,6 @@ describe(__filename, function () {
|
||||||
|
|
||||||
describe('getHTML', function () {
|
describe('getHTML', function () {
|
||||||
it('get the HTML of Pad with emojis', function (done) {
|
it('get the HTML of Pad with emojis', function (done) {
|
||||||
this.timeout(400);
|
|
||||||
agent.get(`${endPoint('getHTML')}&padID=${testPadId}`)
|
agent.get(`${endPoint('getHTML')}&padID=${testPadId}`)
|
||||||
.expect((res) => {
|
.expect((res) => {
|
||||||
if (res.body.data.html.indexOf('🇼') === -1) {
|
if (res.body.data.html.indexOf('🇼') === -1) {
|
||||||
|
|
|
@ -18,7 +18,6 @@ describe(__filename, function () {
|
||||||
|
|
||||||
describe('Connectivity for instance-level API tests', function () {
|
describe('Connectivity for instance-level API tests', function () {
|
||||||
it('can connect', function (done) {
|
it('can connect', function (done) {
|
||||||
this.timeout(150);
|
|
||||||
agent.get('/api/')
|
agent.get('/api/')
|
||||||
.expect('Content-Type', /json/)
|
.expect('Content-Type', /json/)
|
||||||
.expect(200, done);
|
.expect(200, done);
|
||||||
|
@ -27,7 +26,6 @@ describe(__filename, function () {
|
||||||
|
|
||||||
describe('getStats', function () {
|
describe('getStats', function () {
|
||||||
it('Gets the stats of a running instance', function (done) {
|
it('Gets the stats of a running instance', function (done) {
|
||||||
this.timeout(100);
|
|
||||||
agent.get(endPoint('getStats'))
|
agent.get(endPoint('getStats'))
|
||||||
.expect((res) => {
|
.expect((res) => {
|
||||||
if (res.body.code !== 0) throw new Error('getStats() failed');
|
if (res.body.code !== 0) throw new Error('getStats() failed');
|
||||||
|
|
|
@ -18,7 +18,6 @@ describe(__filename, function () {
|
||||||
|
|
||||||
describe('API Versioning', function () {
|
describe('API Versioning', function () {
|
||||||
it('errors if can not connect', async function () {
|
it('errors if can not connect', async function () {
|
||||||
this.timeout(200);
|
|
||||||
await agent.get('/api/')
|
await agent.get('/api/')
|
||||||
.expect(200)
|
.expect(200)
|
||||||
.expect((res) => {
|
.expect((res) => {
|
||||||
|
@ -60,7 +59,6 @@ describe(__filename, function () {
|
||||||
|
|
||||||
describe('API: Group creation and deletion', function () {
|
describe('API: Group creation and deletion', function () {
|
||||||
it('createGroup', async function () {
|
it('createGroup', async function () {
|
||||||
this.timeout(100);
|
|
||||||
await agent.get(endPoint('createGroup'))
|
await agent.get(endPoint('createGroup'))
|
||||||
.expect(200)
|
.expect(200)
|
||||||
.expect('Content-Type', /json/)
|
.expect('Content-Type', /json/)
|
||||||
|
@ -72,7 +70,6 @@ describe(__filename, function () {
|
||||||
});
|
});
|
||||||
|
|
||||||
it('listSessionsOfGroup for empty group', async function () {
|
it('listSessionsOfGroup for empty group', async function () {
|
||||||
this.timeout(100);
|
|
||||||
await agent.get(`${endPoint('listSessionsOfGroup')}&groupID=${groupID}`)
|
await agent.get(`${endPoint('listSessionsOfGroup')}&groupID=${groupID}`)
|
||||||
.expect(200)
|
.expect(200)
|
||||||
.expect('Content-Type', /json/)
|
.expect('Content-Type', /json/)
|
||||||
|
@ -83,7 +80,6 @@ describe(__filename, function () {
|
||||||
});
|
});
|
||||||
|
|
||||||
it('deleteGroup', async function () {
|
it('deleteGroup', async function () {
|
||||||
this.timeout(100);
|
|
||||||
await agent.get(`${endPoint('deleteGroup')}&groupID=${groupID}`)
|
await agent.get(`${endPoint('deleteGroup')}&groupID=${groupID}`)
|
||||||
.expect(200)
|
.expect(200)
|
||||||
.expect('Content-Type', /json/)
|
.expect('Content-Type', /json/)
|
||||||
|
@ -93,7 +89,6 @@ describe(__filename, function () {
|
||||||
});
|
});
|
||||||
|
|
||||||
it('createGroupIfNotExistsFor', async function () {
|
it('createGroupIfNotExistsFor', async function () {
|
||||||
this.timeout(100);
|
|
||||||
await agent.get(`${endPoint('createGroupIfNotExistsFor')}&groupMapper=management`)
|
await agent.get(`${endPoint('createGroupIfNotExistsFor')}&groupMapper=management`)
|
||||||
.expect(200)
|
.expect(200)
|
||||||
.expect('Content-Type', /json/)
|
.expect('Content-Type', /json/)
|
||||||
|
@ -106,7 +101,6 @@ describe(__filename, function () {
|
||||||
// Test coverage for https://github.com/ether/etherpad-lite/issues/4227
|
// Test coverage for https://github.com/ether/etherpad-lite/issues/4227
|
||||||
// Creates a group, creates 2 sessions, 2 pads and then deletes the group.
|
// Creates a group, creates 2 sessions, 2 pads and then deletes the group.
|
||||||
it('createGroup', async function () {
|
it('createGroup', async function () {
|
||||||
this.timeout(100);
|
|
||||||
await agent.get(endPoint('createGroup'))
|
await agent.get(endPoint('createGroup'))
|
||||||
.expect(200)
|
.expect(200)
|
||||||
.expect('Content-Type', /json/)
|
.expect('Content-Type', /json/)
|
||||||
|
@ -118,7 +112,6 @@ describe(__filename, function () {
|
||||||
});
|
});
|
||||||
|
|
||||||
it('createAuthor', async function () {
|
it('createAuthor', async function () {
|
||||||
this.timeout(100);
|
|
||||||
await agent.get(endPoint('createAuthor'))
|
await agent.get(endPoint('createAuthor'))
|
||||||
.expect(200)
|
.expect(200)
|
||||||
.expect('Content-Type', /json/)
|
.expect('Content-Type', /json/)
|
||||||
|
@ -130,7 +123,6 @@ describe(__filename, function () {
|
||||||
});
|
});
|
||||||
|
|
||||||
it('createSession', async function () {
|
it('createSession', async function () {
|
||||||
this.timeout(100);
|
|
||||||
await agent.get(`${endPoint('createSession')}&authorID=${authorID}&groupID=${groupID}` +
|
await agent.get(`${endPoint('createSession')}&authorID=${authorID}&groupID=${groupID}` +
|
||||||
'&validUntil=999999999999')
|
'&validUntil=999999999999')
|
||||||
.expect(200)
|
.expect(200)
|
||||||
|
@ -143,7 +135,6 @@ describe(__filename, function () {
|
||||||
});
|
});
|
||||||
|
|
||||||
it('createSession', async function () {
|
it('createSession', async function () {
|
||||||
this.timeout(100);
|
|
||||||
await agent.get(`${endPoint('createSession')}&authorID=${authorID}&groupID=${groupID}` +
|
await agent.get(`${endPoint('createSession')}&authorID=${authorID}&groupID=${groupID}` +
|
||||||
'&validUntil=999999999999')
|
'&validUntil=999999999999')
|
||||||
.expect(200)
|
.expect(200)
|
||||||
|
@ -156,7 +147,6 @@ describe(__filename, function () {
|
||||||
});
|
});
|
||||||
|
|
||||||
it('createGroupPad', async function () {
|
it('createGroupPad', async function () {
|
||||||
this.timeout(100);
|
|
||||||
await agent.get(`${endPoint('createGroupPad')}&groupID=${groupID}&padName=x1234567`)
|
await agent.get(`${endPoint('createGroupPad')}&groupID=${groupID}&padName=x1234567`)
|
||||||
.expect(200)
|
.expect(200)
|
||||||
.expect('Content-Type', /json/)
|
.expect('Content-Type', /json/)
|
||||||
|
@ -166,7 +156,6 @@ describe(__filename, function () {
|
||||||
});
|
});
|
||||||
|
|
||||||
it('createGroupPad', async function () {
|
it('createGroupPad', async function () {
|
||||||
this.timeout(100);
|
|
||||||
await agent.get(`${endPoint('createGroupPad')}&groupID=${groupID}&padName=x12345678`)
|
await agent.get(`${endPoint('createGroupPad')}&groupID=${groupID}&padName=x12345678`)
|
||||||
.expect(200)
|
.expect(200)
|
||||||
.expect('Content-Type', /json/)
|
.expect('Content-Type', /json/)
|
||||||
|
@ -176,7 +165,6 @@ describe(__filename, function () {
|
||||||
});
|
});
|
||||||
|
|
||||||
it('deleteGroup', async function () {
|
it('deleteGroup', async function () {
|
||||||
this.timeout(100);
|
|
||||||
await agent.get(`${endPoint('deleteGroup')}&groupID=${groupID}`)
|
await agent.get(`${endPoint('deleteGroup')}&groupID=${groupID}`)
|
||||||
.expect(200)
|
.expect(200)
|
||||||
.expect('Content-Type', /json/)
|
.expect('Content-Type', /json/)
|
||||||
|
@ -189,7 +177,6 @@ describe(__filename, function () {
|
||||||
|
|
||||||
describe('API: Author creation', function () {
|
describe('API: Author creation', function () {
|
||||||
it('createGroup', async function () {
|
it('createGroup', async function () {
|
||||||
this.timeout(100);
|
|
||||||
await agent.get(endPoint('createGroup'))
|
await agent.get(endPoint('createGroup'))
|
||||||
.expect(200)
|
.expect(200)
|
||||||
.expect('Content-Type', /json/)
|
.expect('Content-Type', /json/)
|
||||||
|
@ -201,7 +188,6 @@ describe(__filename, function () {
|
||||||
});
|
});
|
||||||
|
|
||||||
it('createAuthor', async function () {
|
it('createAuthor', async function () {
|
||||||
this.timeout(100);
|
|
||||||
await agent.get(endPoint('createAuthor'))
|
await agent.get(endPoint('createAuthor'))
|
||||||
.expect(200)
|
.expect(200)
|
||||||
.expect('Content-Type', /json/)
|
.expect('Content-Type', /json/)
|
||||||
|
@ -212,7 +198,6 @@ describe(__filename, function () {
|
||||||
});
|
});
|
||||||
|
|
||||||
it('createAuthor with name', async function () {
|
it('createAuthor with name', async function () {
|
||||||
this.timeout(100);
|
|
||||||
await agent.get(`${endPoint('createAuthor')}&name=john`)
|
await agent.get(`${endPoint('createAuthor')}&name=john`)
|
||||||
.expect(200)
|
.expect(200)
|
||||||
.expect('Content-Type', /json/)
|
.expect('Content-Type', /json/)
|
||||||
|
@ -224,7 +209,6 @@ describe(__filename, function () {
|
||||||
});
|
});
|
||||||
|
|
||||||
it('createAuthorIfNotExistsFor', async function () {
|
it('createAuthorIfNotExistsFor', async function () {
|
||||||
this.timeout(100);
|
|
||||||
await agent.get(`${endPoint('createAuthorIfNotExistsFor')}&authorMapper=chris`)
|
await agent.get(`${endPoint('createAuthorIfNotExistsFor')}&authorMapper=chris`)
|
||||||
.expect(200)
|
.expect(200)
|
||||||
.expect('Content-Type', /json/)
|
.expect('Content-Type', /json/)
|
||||||
|
@ -235,7 +219,6 @@ describe(__filename, function () {
|
||||||
});
|
});
|
||||||
|
|
||||||
it('getAuthorName', async function () {
|
it('getAuthorName', async function () {
|
||||||
this.timeout(100);
|
|
||||||
await agent.get(`${endPoint('getAuthorName')}&authorID=${authorID}`)
|
await agent.get(`${endPoint('getAuthorName')}&authorID=${authorID}`)
|
||||||
.expect(200)
|
.expect(200)
|
||||||
.expect('Content-Type', /json/)
|
.expect('Content-Type', /json/)
|
||||||
|
@ -248,7 +231,6 @@ describe(__filename, function () {
|
||||||
|
|
||||||
describe('API: Sessions', function () {
|
describe('API: Sessions', function () {
|
||||||
it('createSession', async function () {
|
it('createSession', async function () {
|
||||||
this.timeout(100);
|
|
||||||
await agent.get(`${endPoint('createSession')}&authorID=${authorID}&groupID=${groupID}` +
|
await agent.get(`${endPoint('createSession')}&authorID=${authorID}&groupID=${groupID}` +
|
||||||
'&validUntil=999999999999')
|
'&validUntil=999999999999')
|
||||||
.expect(200)
|
.expect(200)
|
||||||
|
@ -261,7 +243,6 @@ describe(__filename, function () {
|
||||||
});
|
});
|
||||||
|
|
||||||
it('getSessionInfo', async function () {
|
it('getSessionInfo', async function () {
|
||||||
this.timeout(100);
|
|
||||||
await agent.get(`${endPoint('getSessionInfo')}&sessionID=${sessionID}`)
|
await agent.get(`${endPoint('getSessionInfo')}&sessionID=${sessionID}`)
|
||||||
.expect(200)
|
.expect(200)
|
||||||
.expect('Content-Type', /json/)
|
.expect('Content-Type', /json/)
|
||||||
|
@ -274,7 +255,6 @@ describe(__filename, function () {
|
||||||
});
|
});
|
||||||
|
|
||||||
it('listSessionsOfGroup', async function () {
|
it('listSessionsOfGroup', async function () {
|
||||||
this.timeout(100);
|
|
||||||
await agent.get(`${endPoint('listSessionsOfGroup')}&groupID=${groupID}`)
|
await agent.get(`${endPoint('listSessionsOfGroup')}&groupID=${groupID}`)
|
||||||
.expect(200)
|
.expect(200)
|
||||||
.expect('Content-Type', /json/)
|
.expect('Content-Type', /json/)
|
||||||
|
@ -285,7 +265,6 @@ describe(__filename, function () {
|
||||||
});
|
});
|
||||||
|
|
||||||
it('deleteSession', async function () {
|
it('deleteSession', async function () {
|
||||||
this.timeout(100);
|
|
||||||
await agent.get(`${endPoint('deleteSession')}&sessionID=${sessionID}`)
|
await agent.get(`${endPoint('deleteSession')}&sessionID=${sessionID}`)
|
||||||
.expect(200)
|
.expect(200)
|
||||||
.expect('Content-Type', /json/)
|
.expect('Content-Type', /json/)
|
||||||
|
@ -295,7 +274,6 @@ describe(__filename, function () {
|
||||||
});
|
});
|
||||||
|
|
||||||
it('getSessionInfo of deleted session', async function () {
|
it('getSessionInfo of deleted session', async function () {
|
||||||
this.timeout(100);
|
|
||||||
await agent.get(`${endPoint('getSessionInfo')}&sessionID=${sessionID}`)
|
await agent.get(`${endPoint('getSessionInfo')}&sessionID=${sessionID}`)
|
||||||
.expect(200)
|
.expect(200)
|
||||||
.expect('Content-Type', /json/)
|
.expect('Content-Type', /json/)
|
||||||
|
@ -307,7 +285,6 @@ describe(__filename, function () {
|
||||||
|
|
||||||
describe('API: Group pad management', function () {
|
describe('API: Group pad management', function () {
|
||||||
it('listPads', async function () {
|
it('listPads', async function () {
|
||||||
this.timeout(100);
|
|
||||||
await agent.get(`${endPoint('listPads')}&groupID=${groupID}`)
|
await agent.get(`${endPoint('listPads')}&groupID=${groupID}`)
|
||||||
.expect(200)
|
.expect(200)
|
||||||
.expect('Content-Type', /json/)
|
.expect('Content-Type', /json/)
|
||||||
|
@ -318,7 +295,6 @@ describe(__filename, function () {
|
||||||
});
|
});
|
||||||
|
|
||||||
it('createGroupPad', async function () {
|
it('createGroupPad', async function () {
|
||||||
this.timeout(100);
|
|
||||||
await agent.get(`${endPoint('createGroupPad')}&groupID=${groupID}&padName=${padID}`)
|
await agent.get(`${endPoint('createGroupPad')}&groupID=${groupID}&padName=${padID}`)
|
||||||
.expect(200)
|
.expect(200)
|
||||||
.expect('Content-Type', /json/)
|
.expect('Content-Type', /json/)
|
||||||
|
@ -329,7 +305,6 @@ describe(__filename, function () {
|
||||||
});
|
});
|
||||||
|
|
||||||
it('listPads after creating a group pad', async function () {
|
it('listPads after creating a group pad', async function () {
|
||||||
this.timeout(100);
|
|
||||||
await agent.get(`${endPoint('listPads')}&groupID=${groupID}`)
|
await agent.get(`${endPoint('listPads')}&groupID=${groupID}`)
|
||||||
.expect(200)
|
.expect(200)
|
||||||
.expect('Content-Type', /json/)
|
.expect('Content-Type', /json/)
|
||||||
|
@ -342,7 +317,6 @@ describe(__filename, function () {
|
||||||
|
|
||||||
describe('API: Pad security', function () {
|
describe('API: Pad security', function () {
|
||||||
it('getPublicStatus', async function () {
|
it('getPublicStatus', async function () {
|
||||||
this.timeout(100);
|
|
||||||
await agent.get(`${endPoint('getPublicStatus')}&padID=${padID}`)
|
await agent.get(`${endPoint('getPublicStatus')}&padID=${padID}`)
|
||||||
.expect(200)
|
.expect(200)
|
||||||
.expect('Content-Type', /json/)
|
.expect('Content-Type', /json/)
|
||||||
|
@ -353,7 +327,6 @@ describe(__filename, function () {
|
||||||
});
|
});
|
||||||
|
|
||||||
it('setPublicStatus', async function () {
|
it('setPublicStatus', async function () {
|
||||||
this.timeout(100);
|
|
||||||
await agent.get(`${endPoint('setPublicStatus')}&padID=${padID}&publicStatus=true`)
|
await agent.get(`${endPoint('setPublicStatus')}&padID=${padID}&publicStatus=true`)
|
||||||
.expect(200)
|
.expect(200)
|
||||||
.expect('Content-Type', /json/)
|
.expect('Content-Type', /json/)
|
||||||
|
@ -363,7 +336,6 @@ describe(__filename, function () {
|
||||||
});
|
});
|
||||||
|
|
||||||
it('getPublicStatus after changing public status', async function () {
|
it('getPublicStatus after changing public status', async function () {
|
||||||
this.timeout(100);
|
|
||||||
await agent.get(`${endPoint('getPublicStatus')}&padID=${padID}`)
|
await agent.get(`${endPoint('getPublicStatus')}&padID=${padID}`)
|
||||||
.expect(200)
|
.expect(200)
|
||||||
.expect('Content-Type', /json/)
|
.expect('Content-Type', /json/)
|
||||||
|
@ -380,7 +352,6 @@ describe(__filename, function () {
|
||||||
|
|
||||||
describe('API: Misc', function () {
|
describe('API: Misc', function () {
|
||||||
it('listPadsOfAuthor', async function () {
|
it('listPadsOfAuthor', async function () {
|
||||||
this.timeout(100);
|
|
||||||
await agent.get(`${endPoint('listPadsOfAuthor')}&authorID=${authorID}`)
|
await agent.get(`${endPoint('listPadsOfAuthor')}&authorID=${authorID}`)
|
||||||
.expect(200)
|
.expect(200)
|
||||||
.expect('Content-Type', /json/)
|
.expect('Content-Type', /json/)
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue