From 2732eeff9e6994582293b5aaa0cb158b7e272e9e Mon Sep 17 00:00:00 2001 From: Chocobozzz Date: Fri, 9 Dec 2022 11:14:47 +0100 Subject: Fix CI using 127.0.0.1 for tests --- server/tests/cli/update-host.ts | 16 ++++++++-------- 1 file changed, 8 insertions(+), 8 deletions(-) (limited to 'server/tests/cli/update-host.ts') diff --git a/server/tests/cli/update-host.ts b/server/tests/cli/update-host.ts index 97632450a..51257d3d3 100644 --- a/server/tests/cli/update-host.ts +++ b/server/tests/cli/update-host.ts @@ -67,7 +67,7 @@ describe('Test update host scripts', function () { for (const video of data) { const { body } = await makeActivityPubGetRequest(server.url, '/videos/watch/' + video.uuid) - expect(body.id).to.equal('http://localhost:9002/videos/watch/' + video.uuid) + expect(body.id).to.equal('http://127.0.0.1:9002/videos/watch/' + video.uuid) const videoDetails = await server.videos.get({ id: video.uuid }) @@ -84,7 +84,7 @@ describe('Test update host scripts', function () { for (const channel of data) { const { body } = await makeActivityPubGetRequest(server.url, '/video-channels/' + channel.name) - expect(body.id).to.equal('http://localhost:9002/video-channels/' + channel.name) + expect(body.id).to.equal('http://127.0.0.1:9002/video-channels/' + channel.name) } }) @@ -96,7 +96,7 @@ describe('Test update host scripts', function () { const usernameWithDomain = account.name const { body } = await makeActivityPubGetRequest(server.url, '/accounts/' + usernameWithDomain) - expect(body.id).to.equal('http://localhost:9002/accounts/' + usernameWithDomain) + expect(body.id).to.equal('http://127.0.0.1:9002/accounts/' + usernameWithDomain) } }) @@ -113,17 +113,17 @@ describe('Test update host scripts', function () { expect(files).to.have.lengthOf(8) for (const file of files) { - expect(file.magnetUri).to.contain('localhost%3A9002%2Ftracker%2Fsocket') - expect(file.magnetUri).to.contain('localhost%3A9002%2Fstatic%2F') + expect(file.magnetUri).to.contain('127.0.0.1%3A9002%2Ftracker%2Fsocket') + expect(file.magnetUri).to.contain('127.0.0.1%3A9002%2Fstatic%2F') const torrent = await parseTorrentVideo(server, file) - const announceWS = torrent.announce.find(a => a === 'ws://localhost:9002/tracker/socket') + const announceWS = torrent.announce.find(a => a === 'ws://127.0.0.1:9002/tracker/socket') expect(announceWS).to.not.be.undefined - const announceHttp = torrent.announce.find(a => a === 'http://localhost:9002/tracker/announce') + const announceHttp = torrent.announce.find(a => a === 'http://127.0.0.1:9002/tracker/announce') expect(announceHttp).to.not.be.undefined - expect(torrent.urlList[0]).to.contain('http://localhost:9002/static/') + expect(torrent.urlList[0]).to.contain('http://127.0.0.1:9002/static/') } } }) -- cgit v1.2.3