]> git.immae.eu Git - github/Chocobozzz/PeerTube.git/blobdiff - server/tests/api/videos/video-channels.ts
Merge branch 'release/5.1.0' into develop
[github/Chocobozzz/PeerTube.git] / server / tests / api / videos / video-channels.ts
index b7645ea596ecd5ac5d12d8e8c85c860292d7c054..64bd4d9ae4260e01777d74c869ec2fb1d93f4768 100644 (file)
@@ -1,6 +1,6 @@
 /* eslint-disable @typescript-eslint/no-unused-expressions,@typescript-eslint/require-await */
 
-import * as chai from 'chai'
+import { expect } from 'chai'
 import { basename } from 'path'
 import { ACTOR_IMAGES_SIZE } from '@server/initializers/constants'
 import { testFileExistsOrNot, testImage } from '@server/tests/shared'
@@ -17,8 +17,6 @@ import {
   waitJobs
 } from '@shared/server-commands'
 
-const expect = chai.expect
-
 async function findChannel (server: PeerTubeServer, channelId: number) {
   const body = await server.channels.list({ sort: '-name' })
 
@@ -375,7 +373,7 @@ describe('Test video channels', function () {
     this.timeout(10000)
 
     for (const server of servers) {
-      const channelURI = 'second_video_channel@localhost:' + servers[0].port
+      const channelURI = 'second_video_channel@' + servers[0].host
       const { total, data } = await server.videos.listByChannel({ handle: channelURI })
 
       expect(total).to.equal(1)
@@ -398,13 +396,13 @@ describe('Test video channels', function () {
 
     for (const server of servers) {
       {
-        const secondChannelURI = 'second_video_channel@localhost:' + servers[0].port
+        const secondChannelURI = 'second_video_channel@' + servers[0].host
         const { total } = await server.videos.listByChannel({ handle: secondChannelURI })
         expect(total).to.equal(0)
       }
 
       {
-        const channelURI = 'root_channel@localhost:' + servers[0].port
+        const channelURI = 'root_channel@' + servers[0].host
         const { total, data } = await server.videos.listByChannel({ handle: channelURI })
         expect(total).to.equal(1)