aboutsummaryrefslogtreecommitdiffhomepage
path: root/server/tests/api/users/users-multiple-servers.ts
diff options
context:
space:
mode:
authorChocobozzz <me@florianbigard.com>2019-04-26 08:50:52 +0200
committerChocobozzz <me@florianbigard.com>2019-05-15 15:14:21 +0200
commit48f07b4a4091cb10dc4d179118e155f3a118dca8 (patch)
tree8fcc6bd8cafa636ebaf97a083fafbcc0d52ad5cd /server/tests/api/users/users-multiple-servers.ts
parent7243f84db0f34c6d5610a54603b0cce7c284a7b3 (diff)
downloadPeerTube-48f07b4a4091cb10dc4d179118e155f3a118dca8.tar.gz
PeerTube-48f07b4a4091cb10dc4d179118e155f3a118dca8.tar.zst
PeerTube-48f07b4a4091cb10dc4d179118e155f3a118dca8.zip
All API tests in parallel
Diffstat (limited to 'server/tests/api/users/users-multiple-servers.ts')
-rw-r--r--server/tests/api/users/users-multiple-servers.ts18
1 files changed, 9 insertions, 9 deletions
diff --git a/server/tests/api/users/users-multiple-servers.ts b/server/tests/api/users/users-multiple-servers.ts
index 9a971adb3..988fdad3f 100644
--- a/server/tests/api/users/users-multiple-servers.ts
+++ b/server/tests/api/users/users-multiple-servers.ts
@@ -151,13 +151,13 @@ describe('Test users with multiple servers', function () {
151 for (const server of servers) { 151 for (const server of servers) {
152 const resAccounts = await getAccountsList(server.url, '-createdAt') 152 const resAccounts = await getAccountsList(server.url, '-createdAt')
153 153
154 const rootServer1List = resAccounts.body.data.find(a => a.name === 'root' && a.host === 'localhost:9001') as Account 154 const rootServer1List = resAccounts.body.data.find(a => a.name === 'root' && a.host === 'localhost:' + servers[0].port) as Account
155 expect(rootServer1List).not.to.be.undefined 155 expect(rootServer1List).not.to.be.undefined
156 156
157 const resAccount = await getAccount(server.url, rootServer1List.name + '@' + rootServer1List.host) 157 const resAccount = await getAccount(server.url, rootServer1List.name + '@' + rootServer1List.host)
158 const rootServer1Get = resAccount.body as Account 158 const rootServer1Get = resAccount.body as Account
159 expect(rootServer1Get.name).to.equal('root') 159 expect(rootServer1Get.name).to.equal('root')
160 expect(rootServer1Get.host).to.equal('localhost:9001') 160 expect(rootServer1Get.host).to.equal('localhost:' + servers[0].port)
161 expect(rootServer1Get.displayName).to.equal('my super display name') 161 expect(rootServer1Get.displayName).to.equal('my super display name')
162 expect(rootServer1Get.description).to.equal('my super description updated') 162 expect(rootServer1Get.description).to.equal('my super description updated')
163 163
@@ -188,12 +188,12 @@ describe('Test users with multiple servers', function () {
188 for (const server of servers) { 188 for (const server of servers) {
189 const resAccounts = await getAccountsList(server.url, '-createdAt') 189 const resAccounts = await getAccountsList(server.url, '-createdAt')
190 190
191 const accountDeleted = resAccounts.body.data.find(a => a.name === 'user1' && a.host === 'localhost:9001') as Account 191 const accountDeleted = resAccounts.body.data.find(a => a.name === 'user1' && a.host === 'localhost:' + servers[0].port) as Account
192 expect(accountDeleted).not.to.be.undefined 192 expect(accountDeleted).not.to.be.undefined
193 193
194 const resVideoChannels = await getVideoChannelsList(server.url, 0, 10) 194 const resVideoChannels = await getVideoChannelsList(server.url, 0, 10)
195 const videoChannelDeleted = resVideoChannels.body.data.find(a => { 195 const videoChannelDeleted = resVideoChannels.body.data.find(a => {
196 return a.displayName === 'Main user1 channel' && a.host === 'localhost:9001' 196 return a.displayName === 'Main user1 channel' && a.host === 'localhost:' + servers[0].port
197 }) as VideoChannel 197 }) as VideoChannel
198 expect(videoChannelDeleted).not.to.be.undefined 198 expect(videoChannelDeleted).not.to.be.undefined
199 } 199 }
@@ -205,12 +205,12 @@ describe('Test users with multiple servers', function () {
205 for (const server of servers) { 205 for (const server of servers) {
206 const resAccounts = await getAccountsList(server.url, '-createdAt') 206 const resAccounts = await getAccountsList(server.url, '-createdAt')
207 207
208 const accountDeleted = resAccounts.body.data.find(a => a.name === 'user1' && a.host === 'localhost:9001') as Account 208 const accountDeleted = resAccounts.body.data.find(a => a.name === 'user1' && a.host === 'localhost:' + servers[0].port) as Account
209 expect(accountDeleted).to.be.undefined 209 expect(accountDeleted).to.be.undefined
210 210
211 const resVideoChannels = await getVideoChannelsList(server.url, 0, 10) 211 const resVideoChannels = await getVideoChannelsList(server.url, 0, 10)
212 const videoChannelDeleted = resVideoChannels.body.data.find(a => { 212 const videoChannelDeleted = resVideoChannels.body.data.find(a => {
213 return a.name === 'Main user1 channel' && a.host === 'localhost:9001' 213 return a.name === 'Main user1 channel' && a.host === 'localhost:' + servers[0].port
214 }) as VideoChannel 214 }) as VideoChannel
215 expect(videoChannelDeleted).to.be.undefined 215 expect(videoChannelDeleted).to.be.undefined
216 } 216 }
@@ -218,14 +218,14 @@ describe('Test users with multiple servers', function () {
218 218
219 it('Should not have actor files', async () => { 219 it('Should not have actor files', async () => {
220 for (const server of servers) { 220 for (const server of servers) {
221 await checkActorFilesWereRemoved(userAccountUUID, server.serverNumber) 221 await checkActorFilesWereRemoved(userAccountUUID, server.internalServerNumber)
222 await checkActorFilesWereRemoved(userVideoChannelUUID, server.serverNumber) 222 await checkActorFilesWereRemoved(userVideoChannelUUID, server.internalServerNumber)
223 } 223 }
224 }) 224 })
225 225
226 it('Should not have video files', async () => { 226 it('Should not have video files', async () => {
227 for (const server of servers) { 227 for (const server of servers) {
228 await checkVideoFilesWereRemoved(videoUUID, server.serverNumber) 228 await checkVideoFilesWereRemoved(videoUUID, server.internalServerNumber)
229 } 229 }
230 }) 230 })
231 231