aboutsummaryrefslogtreecommitdiffhomepage
path: root/server/tests/client.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/client.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/client.ts')
-rw-r--r--server/tests/client.ts14
1 files changed, 5 insertions, 9 deletions
diff --git a/server/tests/client.ts b/server/tests/client.ts
index 39ba5fdf6..e0dae2b5e 100644
--- a/server/tests/client.ts
+++ b/server/tests/client.ts
@@ -134,11 +134,9 @@ describe('Test a client controllers', function () {
134 expectedStatus: HttpStatusCode.OK_200 134 expectedStatus: HttpStatusCode.OK_200
135 }) 135 })
136 136
137 const port = servers[0].port 137 const expectedLink = `<link rel="alternate" type="application/json+oembed" href="${servers[0].url}/services/oembed?` +
138 138 `url=http%3A%2F%2F${servers[0].hostname}%3A${servers[0].port}%2Fw%2F${servers[0].store.video.shortUUID}" ` +
139 const expectedLink = '<link rel="alternate" type="application/json+oembed" href="http://localhost:' + port + '/services/oembed?' + 139 `title="${servers[0].store.video.name}" />`
140 `url=http%3A%2F%2Flocalhost%3A${port}%2Fw%2F${servers[0].store.video.shortUUID}" ` +
141 `title="${servers[0].store.video.name}" />`
142 140
143 expect(res.text).to.contain(expectedLink) 141 expect(res.text).to.contain(expectedLink)
144 } 142 }
@@ -155,10 +153,8 @@ describe('Test a client controllers', function () {
155 expectedStatus: HttpStatusCode.OK_200 153 expectedStatus: HttpStatusCode.OK_200
156 }) 154 })
157 155
158 const port = servers[0].port 156 const expectedLink = `<link rel="alternate" type="application/json+oembed" href="${servers[0].url}/services/oembed?` +
159 157 `url=http%3A%2F%2F${servers[0].hostname}%3A${servers[0].port}%2Fw%2Fp%2F${playlist.shortUUID}" ` +
160 const expectedLink = '<link rel="alternate" type="application/json+oembed" href="http://localhost:' + port + '/services/oembed?' +
161 `url=http%3A%2F%2Flocalhost%3A${port}%2Fw%2Fp%2F${playlist.shortUUID}" ` +
162 `title="${playlistName}" />` 158 `title="${playlistName}" />`
163 159
164 expect(res.text).to.contain(expectedLink) 160 expect(res.text).to.contain(expectedLink)