aboutsummaryrefslogtreecommitdiffhomepage
path: root/server/tests/api/videos/videos-views-cleaner.ts
diff options
context:
space:
mode:
authorChocobozzz <me@florianbigard.com>2021-07-16 09:04:35 +0200
committerChocobozzz <me@florianbigard.com>2021-07-20 15:27:18 +0200
commit89d241a79c262b9775c233b73cff080043ebb5e6 (patch)
treecb3b6cb431d25d891ef4e02f66c61d252d17048f /server/tests/api/videos/videos-views-cleaner.ts
parentd23dd9fbfc4d26026352c10f81d2795ceaf2908a (diff)
downloadPeerTube-89d241a79c262b9775c233b73cff080043ebb5e6.tar.gz
PeerTube-89d241a79c262b9775c233b73cff080043ebb5e6.tar.zst
PeerTube-89d241a79c262b9775c233b73cff080043ebb5e6.zip
Shorter server command names
Diffstat (limited to 'server/tests/api/videos/videos-views-cleaner.ts')
-rw-r--r--server/tests/api/videos/videos-views-cleaner.ts22
1 files changed, 11 insertions, 11 deletions
diff --git a/server/tests/api/videos/videos-views-cleaner.ts b/server/tests/api/videos/videos-views-cleaner.ts
index 7ded1bf38..238662cf3 100644
--- a/server/tests/api/videos/videos-views-cleaner.ts
+++ b/server/tests/api/videos/videos-views-cleaner.ts
@@ -30,15 +30,15 @@ describe('Test video views cleaner', function () {
30 30
31 await doubleFollow(servers[0], servers[1]) 31 await doubleFollow(servers[0], servers[1])
32 32
33 videoIdServer1 = (await servers[0].videosCommand.quickUpload({ name: 'video server 1' })).uuid 33 videoIdServer1 = (await servers[0].videos.quickUpload({ name: 'video server 1' })).uuid
34 videoIdServer2 = (await servers[1].videosCommand.quickUpload({ name: 'video server 2' })).uuid 34 videoIdServer2 = (await servers[1].videos.quickUpload({ name: 'video server 2' })).uuid
35 35
36 await waitJobs(servers) 36 await waitJobs(servers)
37 37
38 await servers[0].videosCommand.view({ id: videoIdServer1 }) 38 await servers[0].videos.view({ id: videoIdServer1 })
39 await servers[1].videosCommand.view({ id: videoIdServer1 }) 39 await servers[1].videos.view({ id: videoIdServer1 })
40 await servers[0].videosCommand.view({ id: videoIdServer2 }) 40 await servers[0].videos.view({ id: videoIdServer2 })
41 await servers[1].videosCommand.view({ id: videoIdServer2 }) 41 await servers[1].videos.view({ id: videoIdServer2 })
42 42
43 await waitJobs(servers) 43 await waitJobs(servers)
44 }) 44 })
@@ -56,14 +56,14 @@ describe('Test video views cleaner', function () {
56 56
57 { 57 {
58 for (const server of servers) { 58 for (const server of servers) {
59 const total = await server.sqlCommand.countVideoViewsOf(videoIdServer1) 59 const total = await server.sql.countVideoViewsOf(videoIdServer1)
60 expect(total).to.equal(2, 'Server ' + server.serverNumber + ' does not have the correct amount of views') 60 expect(total).to.equal(2, 'Server ' + server.serverNumber + ' does not have the correct amount of views')
61 } 61 }
62 } 62 }
63 63
64 { 64 {
65 for (const server of servers) { 65 for (const server of servers) {
66 const total = await server.sqlCommand.countVideoViewsOf(videoIdServer2) 66 const total = await server.sql.countVideoViewsOf(videoIdServer2)
67 expect(total).to.equal(2, 'Server ' + server.serverNumber + ' does not have the correct amount of views') 67 expect(total).to.equal(2, 'Server ' + server.serverNumber + ' does not have the correct amount of views')
68 } 68 }
69 } 69 }
@@ -82,16 +82,16 @@ describe('Test video views cleaner', function () {
82 82
83 { 83 {
84 for (const server of servers) { 84 for (const server of servers) {
85 const total = await server.sqlCommand.countVideoViewsOf(videoIdServer1) 85 const total = await server.sql.countVideoViewsOf(videoIdServer1)
86 expect(total).to.equal(2) 86 expect(total).to.equal(2)
87 } 87 }
88 } 88 }
89 89
90 { 90 {
91 const totalServer1 = await servers[0].sqlCommand.countVideoViewsOf(videoIdServer2) 91 const totalServer1 = await servers[0].sql.countVideoViewsOf(videoIdServer2)
92 expect(totalServer1).to.equal(0) 92 expect(totalServer1).to.equal(0)
93 93
94 const totalServer2 = await servers[1].sqlCommand.countVideoViewsOf(videoIdServer2) 94 const totalServer2 = await servers[1].sql.countVideoViewsOf(videoIdServer2)
95 expect(totalServer2).to.equal(2) 95 expect(totalServer2).to.equal(2)
96 } 96 }
97 }) 97 })