diff options
Diffstat (limited to 'server/tests')
-rw-r--r-- | server/tests/api/check-params/logs.ts | 2 | ||||
-rw-r--r-- | server/tests/api/server/jobs.ts | 13 |
2 files changed, 11 insertions, 4 deletions
diff --git a/server/tests/api/check-params/logs.ts b/server/tests/api/check-params/logs.ts index fa67408b7..f9a99796d 100644 --- a/server/tests/api/check-params/logs.ts +++ b/server/tests/api/check-params/logs.ts | |||
@@ -122,7 +122,7 @@ describe('Test logs API validators', function () { | |||
122 | }) | 122 | }) |
123 | 123 | ||
124 | it('Should fail with an invalid stackTrace', async function () { | 124 | it('Should fail with an invalid stackTrace', async function () { |
125 | await server.logs.createLogClient({ payload: { ...base, stackTrace: 's'.repeat(10000) }, expectedStatus }) | 125 | await server.logs.createLogClient({ payload: { ...base, stackTrace: 's'.repeat(20000) }, expectedStatus }) |
126 | }) | 126 | }) |
127 | 127 | ||
128 | it('Should fail with an invalid userAgent', async function () { | 128 | it('Should fail with an invalid userAgent', async function () { |
diff --git a/server/tests/api/server/jobs.ts b/server/tests/api/server/jobs.ts index 96ab2a576..843e148a3 100644 --- a/server/tests/api/server/jobs.ts +++ b/server/tests/api/server/jobs.ts | |||
@@ -60,7 +60,6 @@ describe('Test jobs', function () { | |||
60 | if (job.type === 'videos-views-stats') job = body.data[1] | 60 | if (job.type === 'videos-views-stats') job = body.data[1] |
61 | 61 | ||
62 | expect(job.state).to.equal('completed') | 62 | expect(job.state).to.equal('completed') |
63 | expect(job.type.startsWith('activitypub-')).to.be.true | ||
64 | expect(dateIsValid(job.createdAt as string)).to.be.true | 63 | expect(dateIsValid(job.createdAt as string)).to.be.true |
65 | expect(dateIsValid(job.processedOn as string)).to.be.true | 64 | expect(dateIsValid(job.processedOn as string)).to.be.true |
66 | expect(dateIsValid(job.finishedOn as string)).to.be.true | 65 | expect(dateIsValid(job.finishedOn as string)).to.be.true |
@@ -103,8 +102,16 @@ describe('Test jobs', function () { | |||
103 | 102 | ||
104 | await wait(5000) | 103 | await wait(5000) |
105 | 104 | ||
106 | const body = await servers[1].jobs.list({ state: 'waiting', jobType: 'video-transcoding' }) | 105 | { |
107 | expect(body.data).to.have.lengthOf(4) | 106 | const body = await servers[1].jobs.list({ state: 'waiting', jobType: 'video-transcoding' }) |
107 | // waiting includes waiting-children | ||
108 | expect(body.data).to.have.lengthOf(4) | ||
109 | } | ||
110 | |||
111 | { | ||
112 | const body = await servers[1].jobs.list({ state: 'waiting-children', jobType: 'video-transcoding' }) | ||
113 | expect(body.data).to.have.lengthOf(1) | ||
114 | } | ||
108 | }) | 115 | }) |
109 | 116 | ||
110 | it('Should resume the job queue', async function () { | 117 | it('Should resume the job queue', async function () { |