aboutsummaryrefslogtreecommitdiffhomepage
path: root/server/tests/api/notifications/moderation-notifications.ts
diff options
context:
space:
mode:
Diffstat (limited to 'server/tests/api/notifications/moderation-notifications.ts')
-rw-r--r--server/tests/api/notifications/moderation-notifications.ts118
1 files changed, 59 insertions, 59 deletions
diff --git a/server/tests/api/notifications/moderation-notifications.ts b/server/tests/api/notifications/moderation-notifications.ts
index 91a2b4fa5..e7c5badd2 100644
--- a/server/tests/api/notifications/moderation-notifications.ts
+++ b/server/tests/api/notifications/moderation-notifications.ts
@@ -62,9 +62,9 @@ describe('Test moderation notifications', function () {
62 this.timeout(20000) 62 this.timeout(20000)
63 63
64 const name = 'video for abuse ' + buildUUID() 64 const name = 'video for abuse ' + buildUUID()
65 const video = await servers[0].videosCommand.upload({ token: userAccessToken, attributes: { name } }) 65 const video = await servers[0].videos.upload({ token: userAccessToken, attributes: { name } })
66 66
67 await servers[0].abusesCommand.report({ videoId: video.id, reason: 'super reason' }) 67 await servers[0].abuses.report({ videoId: video.id, reason: 'super reason' })
68 68
69 await waitJobs(servers) 69 await waitJobs(servers)
70 await checkNewVideoAbuseForModerators(baseParams, video.uuid, name, 'presence') 70 await checkNewVideoAbuseForModerators(baseParams, video.uuid, name, 'presence')
@@ -74,12 +74,12 @@ describe('Test moderation notifications', function () {
74 this.timeout(20000) 74 this.timeout(20000)
75 75
76 const name = 'video for abuse ' + buildUUID() 76 const name = 'video for abuse ' + buildUUID()
77 const video = await servers[0].videosCommand.upload({ token: userAccessToken, attributes: { name } }) 77 const video = await servers[0].videos.upload({ token: userAccessToken, attributes: { name } })
78 78
79 await waitJobs(servers) 79 await waitJobs(servers)
80 80
81 const videoId = await servers[1].videosCommand.getId({ uuid: video.uuid }) 81 const videoId = await servers[1].videos.getId({ uuid: video.uuid })
82 await servers[1].abusesCommand.report({ videoId, reason: 'super reason' }) 82 await servers[1].abuses.report({ videoId, reason: 'super reason' })
83 83
84 await waitJobs(servers) 84 await waitJobs(servers)
85 await checkNewVideoAbuseForModerators(baseParams, video.uuid, name, 'presence') 85 await checkNewVideoAbuseForModerators(baseParams, video.uuid, name, 'presence')
@@ -89,8 +89,8 @@ describe('Test moderation notifications', function () {
89 this.timeout(20000) 89 this.timeout(20000)
90 90
91 const name = 'video for abuse ' + buildUUID() 91 const name = 'video for abuse ' + buildUUID()
92 const video = await servers[0].videosCommand.upload({ token: userAccessToken, attributes: { name } }) 92 const video = await servers[0].videos.upload({ token: userAccessToken, attributes: { name } })
93 const comment = await servers[0].commentsCommand.createThread({ 93 const comment = await servers[0].comments.createThread({
94 token: userAccessToken, 94 token: userAccessToken,
95 videoId: video.id, 95 videoId: video.id,
96 text: 'comment abuse ' + buildUUID() 96 text: 'comment abuse ' + buildUUID()
@@ -98,7 +98,7 @@ describe('Test moderation notifications', function () {
98 98
99 await waitJobs(servers) 99 await waitJobs(servers)
100 100
101 await servers[0].abusesCommand.report({ commentId: comment.id, reason: 'super reason' }) 101 await servers[0].abuses.report({ commentId: comment.id, reason: 'super reason' })
102 102
103 await waitJobs(servers) 103 await waitJobs(servers)
104 await checkNewCommentAbuseForModerators(baseParams, video.uuid, name, 'presence') 104 await checkNewCommentAbuseForModerators(baseParams, video.uuid, name, 'presence')
@@ -108,9 +108,9 @@ describe('Test moderation notifications', function () {
108 this.timeout(20000) 108 this.timeout(20000)
109 109
110 const name = 'video for abuse ' + buildUUID() 110 const name = 'video for abuse ' + buildUUID()
111 const video = await servers[0].videosCommand.upload({ token: userAccessToken, attributes: { name } }) 111 const video = await servers[0].videos.upload({ token: userAccessToken, attributes: { name } })
112 112
113 await servers[0].commentsCommand.createThread({ 113 await servers[0].comments.createThread({
114 token: userAccessToken, 114 token: userAccessToken,
115 videoId: video.id, 115 videoId: video.id,
116 text: 'comment abuse ' + buildUUID() 116 text: 'comment abuse ' + buildUUID()
@@ -118,9 +118,9 @@ describe('Test moderation notifications', function () {
118 118
119 await waitJobs(servers) 119 await waitJobs(servers)
120 120
121 const { data } = await servers[1].commentsCommand.listThreads({ videoId: video.uuid }) 121 const { data } = await servers[1].comments.listThreads({ videoId: video.uuid })
122 const commentId = data[0].id 122 const commentId = data[0].id
123 await servers[1].abusesCommand.report({ commentId, reason: 'super reason' }) 123 await servers[1].abuses.report({ commentId, reason: 'super reason' })
124 124
125 await waitJobs(servers) 125 await waitJobs(servers)
126 await checkNewCommentAbuseForModerators(baseParams, video.uuid, name, 'presence') 126 await checkNewCommentAbuseForModerators(baseParams, video.uuid, name, 'presence')
@@ -130,10 +130,10 @@ describe('Test moderation notifications', function () {
130 this.timeout(20000) 130 this.timeout(20000)
131 131
132 const username = 'user' + new Date().getTime() 132 const username = 'user' + new Date().getTime()
133 const { account } = await servers[0].usersCommand.create({ username, password: 'donald' }) 133 const { account } = await servers[0].users.create({ username, password: 'donald' })
134 const accountId = account.id 134 const accountId = account.id
135 135
136 await servers[0].abusesCommand.report({ accountId, reason: 'super reason' }) 136 await servers[0].abuses.report({ accountId, reason: 'super reason' })
137 137
138 await waitJobs(servers) 138 await waitJobs(servers)
139 await checkNewAccountAbuseForModerators(baseParams, username, 'presence') 139 await checkNewAccountAbuseForModerators(baseParams, username, 'presence')
@@ -143,13 +143,13 @@ describe('Test moderation notifications', function () {
143 this.timeout(20000) 143 this.timeout(20000)
144 144
145 const username = 'user' + new Date().getTime() 145 const username = 'user' + new Date().getTime()
146 const tmpToken = await servers[0].usersCommand.generateUserAndToken(username) 146 const tmpToken = await servers[0].users.generateUserAndToken(username)
147 await servers[0].videosCommand.upload({ token: tmpToken, attributes: { name: 'super video' } }) 147 await servers[0].videos.upload({ token: tmpToken, attributes: { name: 'super video' } })
148 148
149 await waitJobs(servers) 149 await waitJobs(servers)
150 150
151 const account = await servers[1].accountsCommand.get({ accountName: username + '@' + servers[0].host }) 151 const account = await servers[1].accounts.get({ accountName: username + '@' + servers[0].host })
152 await servers[1].abusesCommand.report({ accountId: account.id, reason: 'super reason' }) 152 await servers[1].abuses.report({ accountId: account.id, reason: 'super reason' })
153 153
154 await waitJobs(servers) 154 await waitJobs(servers)
155 await checkNewAccountAbuseForModerators(baseParams, username, 'presence') 155 await checkNewAccountAbuseForModerators(baseParams, username, 'presence')
@@ -169,16 +169,16 @@ describe('Test moderation notifications', function () {
169 } 169 }
170 170
171 const name = 'abuse ' + buildUUID() 171 const name = 'abuse ' + buildUUID()
172 const video = await servers[0].videosCommand.upload({ token: userAccessToken, attributes: { name } }) 172 const video = await servers[0].videos.upload({ token: userAccessToken, attributes: { name } })
173 173
174 const body = await servers[0].abusesCommand.report({ token: userAccessToken, videoId: video.id, reason: 'super reason' }) 174 const body = await servers[0].abuses.report({ token: userAccessToken, videoId: video.id, reason: 'super reason' })
175 abuseId = body.abuse.id 175 abuseId = body.abuse.id
176 }) 176 })
177 177
178 it('Should send a notification to reporter if the abuse has been accepted', async function () { 178 it('Should send a notification to reporter if the abuse has been accepted', async function () {
179 this.timeout(10000) 179 this.timeout(10000)
180 180
181 await servers[0].abusesCommand.update({ abuseId, body: { state: AbuseState.ACCEPTED } }) 181 await servers[0].abuses.update({ abuseId, body: { state: AbuseState.ACCEPTED } })
182 await waitJobs(servers) 182 await waitJobs(servers)
183 183
184 await checkAbuseStateChange(baseParams, abuseId, AbuseState.ACCEPTED, 'presence') 184 await checkAbuseStateChange(baseParams, abuseId, AbuseState.ACCEPTED, 'presence')
@@ -187,7 +187,7 @@ describe('Test moderation notifications', function () {
187 it('Should send a notification to reporter if the abuse has been rejected', async function () { 187 it('Should send a notification to reporter if the abuse has been rejected', async function () {
188 this.timeout(10000) 188 this.timeout(10000)
189 189
190 await servers[0].abusesCommand.update({ abuseId, body: { state: AbuseState.REJECTED } }) 190 await servers[0].abuses.update({ abuseId, body: { state: AbuseState.REJECTED } })
191 await waitJobs(servers) 191 await waitJobs(servers)
192 192
193 await checkAbuseStateChange(baseParams, abuseId, AbuseState.REJECTED, 'presence') 193 await checkAbuseStateChange(baseParams, abuseId, AbuseState.REJECTED, 'presence')
@@ -216,15 +216,15 @@ describe('Test moderation notifications', function () {
216 } 216 }
217 217
218 const name = 'abuse ' + buildUUID() 218 const name = 'abuse ' + buildUUID()
219 const video = await servers[0].videosCommand.upload({ token: userAccessToken, attributes: { name } }) 219 const video = await servers[0].videos.upload({ token: userAccessToken, attributes: { name } })
220 220
221 { 221 {
222 const body = await servers[0].abusesCommand.report({ token: userAccessToken, videoId: video.id, reason: 'super reason' }) 222 const body = await servers[0].abuses.report({ token: userAccessToken, videoId: video.id, reason: 'super reason' })
223 abuseId = body.abuse.id 223 abuseId = body.abuse.id
224 } 224 }
225 225
226 { 226 {
227 const body = await servers[0].abusesCommand.report({ token: userAccessToken, videoId: video.id, reason: 'super reason 2' }) 227 const body = await servers[0].abuses.report({ token: userAccessToken, videoId: video.id, reason: 'super reason 2' })
228 abuseId2 = body.abuse.id 228 abuseId2 = body.abuse.id
229 } 229 }
230 }) 230 })
@@ -233,7 +233,7 @@ describe('Test moderation notifications', function () {
233 this.timeout(10000) 233 this.timeout(10000)
234 234
235 const message = 'my super message to users' 235 const message = 'my super message to users'
236 await servers[0].abusesCommand.addMessage({ abuseId, message }) 236 await servers[0].abuses.addMessage({ abuseId, message })
237 await waitJobs(servers) 237 await waitJobs(servers)
238 238
239 await checkNewAbuseMessage(baseParamsUser, abuseId, message, 'user_1@example.com', 'presence') 239 await checkNewAbuseMessage(baseParamsUser, abuseId, message, 'user_1@example.com', 'presence')
@@ -243,7 +243,7 @@ describe('Test moderation notifications', function () {
243 this.timeout(10000) 243 this.timeout(10000)
244 244
245 const message = 'my super message that should not be sent to the admin' 245 const message = 'my super message that should not be sent to the admin'
246 await servers[0].abusesCommand.addMessage({ abuseId, message }) 246 await servers[0].abuses.addMessage({ abuseId, message })
247 await waitJobs(servers) 247 await waitJobs(servers)
248 248
249 await checkNewAbuseMessage(baseParamsAdmin, abuseId, message, 'admin' + servers[0].internalServerNumber + '@example.com', 'absence') 249 await checkNewAbuseMessage(baseParamsAdmin, abuseId, message, 'admin' + servers[0].internalServerNumber + '@example.com', 'absence')
@@ -253,7 +253,7 @@ describe('Test moderation notifications', function () {
253 this.timeout(10000) 253 this.timeout(10000)
254 254
255 const message = 'my super message to moderators' 255 const message = 'my super message to moderators'
256 await servers[0].abusesCommand.addMessage({ token: userAccessToken, abuseId: abuseId2, message }) 256 await servers[0].abuses.addMessage({ token: userAccessToken, abuseId: abuseId2, message })
257 await waitJobs(servers) 257 await waitJobs(servers)
258 258
259 await checkNewAbuseMessage(baseParamsAdmin, abuseId2, message, 'admin' + servers[0].internalServerNumber + '@example.com', 'presence') 259 await checkNewAbuseMessage(baseParamsAdmin, abuseId2, message, 'admin' + servers[0].internalServerNumber + '@example.com', 'presence')
@@ -263,7 +263,7 @@ describe('Test moderation notifications', function () {
263 this.timeout(10000) 263 this.timeout(10000)
264 264
265 const message = 'my super message that should not be sent to reporter' 265 const message = 'my super message that should not be sent to reporter'
266 await servers[0].abusesCommand.addMessage({ token: userAccessToken, abuseId: abuseId2, message }) 266 await servers[0].abuses.addMessage({ token: userAccessToken, abuseId: abuseId2, message })
267 await waitJobs(servers) 267 await waitJobs(servers)
268 268
269 await checkNewAbuseMessage(baseParamsUser, abuseId2, message, 'user_1@example.com', 'absence') 269 await checkNewAbuseMessage(baseParamsUser, abuseId2, message, 'user_1@example.com', 'absence')
@@ -286,9 +286,9 @@ describe('Test moderation notifications', function () {
286 this.timeout(10000) 286 this.timeout(10000)
287 287
288 const name = 'video for abuse ' + buildUUID() 288 const name = 'video for abuse ' + buildUUID()
289 const { uuid } = await servers[0].videosCommand.upload({ token: userAccessToken, attributes: { name } }) 289 const { uuid } = await servers[0].videos.upload({ token: userAccessToken, attributes: { name } })
290 290
291 await servers[0].blacklistCommand.add({ videoId: uuid }) 291 await servers[0].blacklist.add({ videoId: uuid })
292 292
293 await waitJobs(servers) 293 await waitJobs(servers)
294 await checkNewBlacklistOnMyVideo(baseParams, uuid, name, 'blacklist') 294 await checkNewBlacklistOnMyVideo(baseParams, uuid, name, 'blacklist')
@@ -298,12 +298,12 @@ describe('Test moderation notifications', function () {
298 this.timeout(10000) 298 this.timeout(10000)
299 299
300 const name = 'video for abuse ' + buildUUID() 300 const name = 'video for abuse ' + buildUUID()
301 const { uuid } = await servers[0].videosCommand.upload({ token: userAccessToken, attributes: { name } }) 301 const { uuid } = await servers[0].videos.upload({ token: userAccessToken, attributes: { name } })
302 302
303 await servers[0].blacklistCommand.add({ videoId: uuid }) 303 await servers[0].blacklist.add({ videoId: uuid })
304 304
305 await waitJobs(servers) 305 await waitJobs(servers)
306 await servers[0].blacklistCommand.remove({ videoId: uuid }) 306 await servers[0].blacklist.remove({ videoId: uuid })
307 await waitJobs(servers) 307 await waitJobs(servers)
308 308
309 await wait(500) 309 await wait(500)
@@ -326,7 +326,7 @@ describe('Test moderation notifications', function () {
326 it('Should send a notification only to moderators when a user registers on the instance', async function () { 326 it('Should send a notification only to moderators when a user registers on the instance', async function () {
327 this.timeout(10000) 327 this.timeout(10000)
328 328
329 await servers[0].usersCommand.register({ username: 'user_45' }) 329 await servers[0].users.register({ username: 'user_45' })
330 330
331 await waitJobs(servers) 331 await waitJobs(servers)
332 332
@@ -368,7 +368,7 @@ describe('Test moderation notifications', function () {
368 it('Should send a notification only to admin when there is a new instance follower', async function () { 368 it('Should send a notification only to admin when there is a new instance follower', async function () {
369 this.timeout(20000) 369 this.timeout(20000)
370 370
371 await servers[2].followsCommand.follow({ targets: [ servers[0].url ] }) 371 await servers[2].follows.follow({ targets: [ servers[0].url ] })
372 372
373 await waitJobs(servers) 373 await waitJobs(servers)
374 374
@@ -381,7 +381,7 @@ describe('Test moderation notifications', function () {
381 it('Should send a notification on auto follow back', async function () { 381 it('Should send a notification on auto follow back', async function () {
382 this.timeout(40000) 382 this.timeout(40000)
383 383
384 await servers[2].followsCommand.unfollow({ target: servers[0] }) 384 await servers[2].follows.unfollow({ target: servers[0] })
385 await waitJobs(servers) 385 await waitJobs(servers)
386 386
387 const config = { 387 const config = {
@@ -391,9 +391,9 @@ describe('Test moderation notifications', function () {
391 } 391 }
392 } 392 }
393 } 393 }
394 await servers[0].configCommand.updateCustomSubConfig({ newConfig: config }) 394 await servers[0].config.updateCustomSubConfig({ newConfig: config })
395 395
396 await servers[2].followsCommand.follow({ targets: [ servers[0].url ] }) 396 await servers[2].follows.follow({ targets: [ servers[0].url ] })
397 397
398 await waitJobs(servers) 398 await waitJobs(servers)
399 399
@@ -405,16 +405,16 @@ describe('Test moderation notifications', function () {
405 await checkAutoInstanceFollowing({ ...baseParams, ...userOverride }, followerHost, followingHost, 'absence') 405 await checkAutoInstanceFollowing({ ...baseParams, ...userOverride }, followerHost, followingHost, 'absence')
406 406
407 config.followings.instance.autoFollowBack.enabled = false 407 config.followings.instance.autoFollowBack.enabled = false
408 await servers[0].configCommand.updateCustomSubConfig({ newConfig: config }) 408 await servers[0].config.updateCustomSubConfig({ newConfig: config })
409 await servers[0].followsCommand.unfollow({ target: servers[2] }) 409 await servers[0].follows.unfollow({ target: servers[2] })
410 await servers[2].followsCommand.unfollow({ target: servers[0] }) 410 await servers[2].follows.unfollow({ target: servers[0] })
411 }) 411 })
412 412
413 it('Should send a notification on auto instances index follow', async function () { 413 it('Should send a notification on auto instances index follow', async function () {
414 this.timeout(30000) 414 this.timeout(30000)
415 await servers[0].followsCommand.unfollow({ target: servers[1] }) 415 await servers[0].follows.unfollow({ target: servers[1] })
416 416
417 await servers[0].configCommand.updateCustomSubConfig({ newConfig: config }) 417 await servers[0].config.updateCustomSubConfig({ newConfig: config })
418 418
419 await wait(5000) 419 await wait(5000)
420 await waitJobs(servers) 420 await waitJobs(servers)
@@ -424,8 +424,8 @@ describe('Test moderation notifications', function () {
424 await checkAutoInstanceFollowing(baseParams, followerHost, followingHost, 'presence') 424 await checkAutoInstanceFollowing(baseParams, followerHost, followingHost, 'presence')
425 425
426 config.followings.instance.autoFollowIndex.enabled = false 426 config.followings.instance.autoFollowIndex.enabled = false
427 await servers[0].configCommand.updateCustomSubConfig({ newConfig: config }) 427 await servers[0].config.updateCustomSubConfig({ newConfig: config })
428 await servers[0].followsCommand.unfollow({ target: servers[1] }) 428 await servers[0].follows.unfollow({ target: servers[1] })
429 }) 429 })
430 }) 430 })
431 431
@@ -460,7 +460,7 @@ describe('Test moderation notifications', function () {
460 token: userAccessToken 460 token: userAccessToken
461 } 461 }
462 462
463 currentCustomConfig = await servers[0].configCommand.getCustomConfig() 463 currentCustomConfig = await servers[0].config.getCustomConfig()
464 464
465 const autoBlacklistTestsCustomConfig = { 465 const autoBlacklistTestsCustomConfig = {
466 ...currentCustomConfig, 466 ...currentCustomConfig,
@@ -476,10 +476,10 @@ describe('Test moderation notifications', function () {
476 476
477 // enable transcoding otherwise own publish notification after transcoding not expected 477 // enable transcoding otherwise own publish notification after transcoding not expected
478 autoBlacklistTestsCustomConfig.transcoding.enabled = true 478 autoBlacklistTestsCustomConfig.transcoding.enabled = true
479 await servers[0].configCommand.updateCustomConfig({ newCustomConfig: autoBlacklistTestsCustomConfig }) 479 await servers[0].config.updateCustomConfig({ newCustomConfig: autoBlacklistTestsCustomConfig })
480 480
481 await servers[0].subscriptionsCommand.add({ targetUri: 'user_1_channel@localhost:' + servers[0].port }) 481 await servers[0].subscriptions.add({ targetUri: 'user_1_channel@localhost:' + servers[0].port })
482 await servers[1].subscriptionsCommand.add({ targetUri: 'user_1_channel@localhost:' + servers[0].port }) 482 await servers[1].subscriptions.add({ targetUri: 'user_1_channel@localhost:' + servers[0].port })
483 483
484 }) 484 })
485 485
@@ -487,7 +487,7 @@ describe('Test moderation notifications', function () {
487 this.timeout(40000) 487 this.timeout(40000)
488 488
489 videoName = 'video with auto-blacklist ' + buildUUID() 489 videoName = 'video with auto-blacklist ' + buildUUID()
490 const { uuid } = await servers[0].videosCommand.upload({ token: userAccessToken, attributes: { name: videoName } }) 490 const { uuid } = await servers[0].videos.upload({ token: userAccessToken, attributes: { name: videoName } })
491 videoUUID = uuid 491 videoUUID = uuid
492 492
493 await waitJobs(servers) 493 await waitJobs(servers)
@@ -509,7 +509,7 @@ describe('Test moderation notifications', function () {
509 it('Should send video published and unblacklist after video unblacklisted', async function () { 509 it('Should send video published and unblacklist after video unblacklisted', async function () {
510 this.timeout(40000) 510 this.timeout(40000)
511 511
512 await servers[0].blacklistCommand.remove({ videoId: videoUUID }) 512 await servers[0].blacklist.remove({ videoId: videoUUID })
513 513
514 await waitJobs(servers) 514 await waitJobs(servers)
515 515
@@ -543,9 +543,9 @@ describe('Test moderation notifications', function () {
543 } 543 }
544 } 544 }
545 545
546 const { uuid } = await servers[0].videosCommand.upload({ token: userAccessToken, attributes }) 546 const { uuid } = await servers[0].videos.upload({ token: userAccessToken, attributes })
547 547
548 await servers[0].blacklistCommand.remove({ videoId: uuid }) 548 await servers[0].blacklist.remove({ videoId: uuid })
549 549
550 await waitJobs(servers) 550 await waitJobs(servers)
551 await checkNewBlacklistOnMyVideo(userBaseParams, uuid, name, 'unblacklist') 551 await checkNewBlacklistOnMyVideo(userBaseParams, uuid, name, 'unblacklist')
@@ -575,7 +575,7 @@ describe('Test moderation notifications', function () {
575 } 575 }
576 } 576 }
577 577
578 const { uuid } = await servers[0].videosCommand.upload({ token: userAccessToken, attributes }) 578 const { uuid } = await servers[0].videos.upload({ token: userAccessToken, attributes })
579 579
580 await wait(6000) 580 await wait(6000)
581 await checkVideoIsPublished(userBaseParams, name, uuid, 'absence') 581 await checkVideoIsPublished(userBaseParams, name, uuid, 'absence')
@@ -589,17 +589,17 @@ describe('Test moderation notifications', function () {
589 const name = 'video without auto-blacklist ' + buildUUID() 589 const name = 'video without auto-blacklist ' + buildUUID()
590 590
591 // admin with blacklist right will not be auto-blacklisted 591 // admin with blacklist right will not be auto-blacklisted
592 const { uuid } = await servers[0].videosCommand.upload({ attributes: { name } }) 592 const { uuid } = await servers[0].videos.upload({ attributes: { name } })
593 593
594 await waitJobs(servers) 594 await waitJobs(servers)
595 await checkVideoAutoBlacklistForModerators(adminBaseParamsServer1, uuid, name, 'absence') 595 await checkVideoAutoBlacklistForModerators(adminBaseParamsServer1, uuid, name, 'absence')
596 }) 596 })
597 597
598 after(async () => { 598 after(async () => {
599 await servers[0].configCommand.updateCustomConfig({ newCustomConfig: currentCustomConfig }) 599 await servers[0].config.updateCustomConfig({ newCustomConfig: currentCustomConfig })
600 600
601 await servers[0].subscriptionsCommand.remove({ uri: 'user_1_channel@localhost:' + servers[0].port }) 601 await servers[0].subscriptions.remove({ uri: 'user_1_channel@localhost:' + servers[0].port })
602 await servers[1].subscriptionsCommand.remove({ uri: 'user_1_channel@localhost:' + servers[0].port }) 602 await servers[1].subscriptions.remove({ uri: 'user_1_channel@localhost:' + servers[0].port })
603 }) 603 })
604 }) 604 })
605 605