aboutsummaryrefslogtreecommitdiffhomepage
path: root/server/tests/api
diff options
context:
space:
mode:
authorChocobozzz <me@florianbigard.com>2020-12-14 12:00:35 +0100
committerChocobozzz <me@florianbigard.com>2020-12-14 12:00:35 +0100
commit402145b8630d1908c35f8c22846ddc4475f25d3e (patch)
treeff50cb09c5f56cc408ef20a7c959ef7a0642b76b /server/tests/api
parentc04816108e8ec62eb29caf82806f3927dc5eb85a (diff)
downloadPeerTube-402145b8630d1908c35f8c22846ddc4475f25d3e.tar.gz
PeerTube-402145b8630d1908c35f8c22846ddc4475f25d3e.tar.zst
PeerTube-402145b8630d1908c35f8c22846ddc4475f25d3e.zip
Refactor jobs state
Diffstat (limited to 'server/tests/api')
-rw-r--r--server/tests/api/server/jobs.ts13
1 files changed, 13 insertions, 0 deletions
diff --git a/server/tests/api/server/jobs.ts b/server/tests/api/server/jobs.ts
index 19c8836b5..d0e222997 100644
--- a/server/tests/api/server/jobs.ts
+++ b/server/tests/api/server/jobs.ts
@@ -83,6 +83,19 @@ describe('Test jobs', function () {
83 } 83 }
84 }) 84 })
85 85
86 it('Should list all jobs', async function () {
87 const res = await getJobsList(servers[1].url, servers[1].accessToken)
88
89 const jobs = res.body.data as Job[]
90
91 expect(res.body.total).to.be.above(2)
92 expect(jobs).to.have.length.above(2)
93
94 // We know there are a least 1 delayed job (video views) and 1 completed job (broadcast)
95 expect(jobs.find(j => j.state === 'delayed')).to.not.be.undefined
96 expect(jobs.find(j => j.state === 'completed')).to.not.be.undefined
97 })
98
86 after(async function () { 99 after(async function () {
87 await cleanupTests(servers) 100 await cleanupTests(servers)
88 }) 101 })