aboutsummaryrefslogtreecommitdiffhomepage
path: root/server/tests/api/users/users-multiple-servers.ts
diff options
context:
space:
mode:
authorChocobozzz <me@florianbigard.com>2022-12-09 11:14:47 +0100
committerChocobozzz <me@florianbigard.com>2022-12-12 13:36:23 +0100
commit2732eeff9e6994582293b5aaa0cb158b7e272e9e (patch)
tree417d30cf470cd1db84e06c5dbd1b5429d4b99bc1 /server/tests/api/users/users-multiple-servers.ts
parentc7c5f8d0f17b0ab598fbe237f11639c6de28110c (diff)
downloadPeerTube-2732eeff9e6994582293b5aaa0cb158b7e272e9e.tar.gz
PeerTube-2732eeff9e6994582293b5aaa0cb158b7e272e9e.tar.zst
PeerTube-2732eeff9e6994582293b5aaa0cb158b7e272e9e.zip
Fix CI using 127.0.0.1 for tests
Diffstat (limited to 'server/tests/api/users/users-multiple-servers.ts')
-rw-r--r--server/tests/api/users/users-multiple-servers.ts16
1 files changed, 8 insertions, 8 deletions
diff --git a/server/tests/api/users/users-multiple-servers.ts b/server/tests/api/users/users-multiple-servers.ts
index 188e6f137..f94191b04 100644
--- a/server/tests/api/users/users-multiple-servers.ts
+++ b/server/tests/api/users/users-multiple-servers.ts
@@ -111,7 +111,7 @@ describe('Test users with multiple servers', function () {
111 for (const server of servers) { 111 for (const server of servers) {
112 const body = await server.accounts.list({ sort: '-createdAt' }) 112 const body = await server.accounts.list({ sort: '-createdAt' })
113 113
114 const resList = body.data.find(a => a.name === 'root' && a.host === 'localhost:' + servers[0].port) 114 const resList = body.data.find(a => a.name === 'root' && a.host === servers[0].host)
115 expect(resList).not.to.be.undefined 115 expect(resList).not.to.be.undefined
116 116
117 const account = await server.accounts.get({ accountName: resList.name + '@' + resList.host }) 117 const account = await server.accounts.get({ accountName: resList.name + '@' + resList.host })
@@ -119,7 +119,7 @@ describe('Test users with multiple servers', function () {
119 if (!createdAt) createdAt = account.createdAt 119 if (!createdAt) createdAt = account.createdAt
120 120
121 expect(account.name).to.equal('root') 121 expect(account.name).to.equal('root')
122 expect(account.host).to.equal('localhost:' + servers[0].port) 122 expect(account.host).to.equal(servers[0].host)
123 expect(account.displayName).to.equal('my super display name') 123 expect(account.displayName).to.equal('my super display name')
124 expect(account.description).to.equal('my super description updated') 124 expect(account.description).to.equal('my super description updated')
125 expect(createdAt).to.equal(account.createdAt) 125 expect(createdAt).to.equal(account.createdAt)
@@ -138,7 +138,7 @@ describe('Test users with multiple servers', function () {
138 138
139 it('Should list account videos', async function () { 139 it('Should list account videos', async function () {
140 for (const server of servers) { 140 for (const server of servers) {
141 const { total, data } = await server.videos.listByAccount({ handle: 'user1@localhost:' + servers[0].port }) 141 const { total, data } = await server.videos.listByAccount({ handle: 'user1@' + servers[0].host })
142 142
143 expect(total).to.equal(1) 143 expect(total).to.equal(1)
144 expect(data).to.be.an('array') 144 expect(data).to.be.an('array')
@@ -155,7 +155,7 @@ describe('Test users with multiple servers', function () {
155 await waitJobs(servers) 155 await waitJobs(servers)
156 156
157 for (const server of servers) { 157 for (const server of servers) {
158 const { total, data } = await server.videos.listByAccount({ handle: 'user1@localhost:' + servers[0].port, search: 'Kami' }) 158 const { total, data } = await server.videos.listByAccount({ handle: 'user1@' + servers[0].host, search: 'Kami' })
159 159
160 expect(total).to.equal(1) 160 expect(total).to.equal(1)
161 expect(data).to.be.an('array') 161 expect(data).to.be.an('array')
@@ -170,11 +170,11 @@ describe('Test users with multiple servers', function () {
170 for (const server of servers) { 170 for (const server of servers) {
171 const body = await server.accounts.list({ sort: '-createdAt' }) 171 const body = await server.accounts.list({ sort: '-createdAt' })
172 172
173 const accountDeleted = body.data.find(a => a.name === 'user1' && a.host === 'localhost:' + servers[0].port) 173 const accountDeleted = body.data.find(a => a.name === 'user1' && a.host === servers[0].host)
174 expect(accountDeleted).not.to.be.undefined 174 expect(accountDeleted).not.to.be.undefined
175 175
176 const { data } = await server.channels.list() 176 const { data } = await server.channels.list()
177 const videoChannelDeleted = data.find(a => a.displayName === 'Main user1 channel' && a.host === 'localhost:' + servers[0].port) 177 const videoChannelDeleted = data.find(a => a.displayName === 'Main user1 channel' && a.host === servers[0].host)
178 expect(videoChannelDeleted).not.to.be.undefined 178 expect(videoChannelDeleted).not.to.be.undefined
179 } 179 }
180 180
@@ -185,11 +185,11 @@ describe('Test users with multiple servers', function () {
185 for (const server of servers) { 185 for (const server of servers) {
186 const body = await server.accounts.list({ sort: '-createdAt' }) 186 const body = await server.accounts.list({ sort: '-createdAt' })
187 187
188 const accountDeleted = body.data.find(a => a.name === 'user1' && a.host === 'localhost:' + servers[0].port) 188 const accountDeleted = body.data.find(a => a.name === 'user1' && a.host === servers[0].host)
189 expect(accountDeleted).to.be.undefined 189 expect(accountDeleted).to.be.undefined
190 190
191 const { data } = await server.channels.list() 191 const { data } = await server.channels.list()
192 const videoChannelDeleted = data.find(a => a.name === 'Main user1 channel' && a.host === 'localhost:' + servers[0].port) 192 const videoChannelDeleted = data.find(a => a.name === 'Main user1 channel' && a.host === servers[0].host)
193 expect(videoChannelDeleted).to.be.undefined 193 expect(videoChannelDeleted).to.be.undefined
194 } 194 }
195 }) 195 })