diff options
author | Chocobozzz <me@florianbigard.com> | 2022-12-09 11:14:47 +0100 |
---|---|---|
committer | Chocobozzz <me@florianbigard.com> | 2022-12-12 13:36:23 +0100 |
commit | 2732eeff9e6994582293b5aaa0cb158b7e272e9e (patch) | |
tree | 417d30cf470cd1db84e06c5dbd1b5429d4b99bc1 /server/tests/cli | |
parent | c7c5f8d0f17b0ab598fbe237f11639c6de28110c (diff) | |
download | PeerTube-2732eeff9e6994582293b5aaa0cb158b7e272e9e.tar.gz PeerTube-2732eeff9e6994582293b5aaa0cb158b7e272e9e.tar.zst PeerTube-2732eeff9e6994582293b5aaa0cb158b7e272e9e.zip |
Fix CI using 127.0.0.1 for tests
Diffstat (limited to 'server/tests/cli')
-rw-r--r-- | server/tests/cli/peertube.ts | 2 | ||||
-rw-r--r-- | server/tests/cli/prune-storage.ts | 4 | ||||
-rw-r--r-- | server/tests/cli/update-host.ts | 16 |
3 files changed, 11 insertions, 11 deletions
diff --git a/server/tests/cli/peertube.ts b/server/tests/cli/peertube.ts index a39bcfebe..400d5867c 100644 --- a/server/tests/cli/peertube.ts +++ b/server/tests/cli/peertube.ts | |||
@@ -300,7 +300,7 @@ describe('Test CLI wrapper', function () { | |||
300 | const stdout = await cliCommand.execWithEnv(`${cmd} redundancy ${params}`) | 300 | const stdout = await cliCommand.execWithEnv(`${cmd} redundancy ${params}`) |
301 | 301 | ||
302 | expect(stdout).to.contain('super video') | 302 | expect(stdout).to.contain('super video') |
303 | expect(stdout).to.contain(`localhost:${server.port}`) | 303 | expect(stdout).to.contain(server.host) |
304 | } | 304 | } |
305 | }) | 305 | }) |
306 | 306 | ||
diff --git a/server/tests/cli/prune-storage.ts b/server/tests/cli/prune-storage.ts index ba0fa1f86..8bdf2136d 100644 --- a/server/tests/cli/prune-storage.ts +++ b/server/tests/cli/prune-storage.ts | |||
@@ -94,7 +94,7 @@ describe('Test prune storage scripts', function () { | |||
94 | 94 | ||
95 | // Lazy load the remote avatars | 95 | // Lazy load the remote avatars |
96 | { | 96 | { |
97 | const account = await servers[0].accounts.get({ accountName: 'root@localhost:' + servers[1].port }) | 97 | const account = await servers[0].accounts.get({ accountName: 'root@' + servers[1].host }) |
98 | 98 | ||
99 | for (const avatar of account.avatars) { | 99 | for (const avatar of account.avatars) { |
100 | await makeGetRequest({ | 100 | await makeGetRequest({ |
@@ -106,7 +106,7 @@ describe('Test prune storage scripts', function () { | |||
106 | } | 106 | } |
107 | 107 | ||
108 | { | 108 | { |
109 | const account = await servers[1].accounts.get({ accountName: 'root@localhost:' + servers[0].port }) | 109 | const account = await servers[1].accounts.get({ accountName: 'root@' + servers[0].host }) |
110 | for (const avatar of account.avatars) { | 110 | for (const avatar of account.avatars) { |
111 | await makeGetRequest({ | 111 | await makeGetRequest({ |
112 | url: servers[1].url, | 112 | url: servers[1].url, |
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 () { | |||
67 | for (const video of data) { | 67 | for (const video of data) { |
68 | const { body } = await makeActivityPubGetRequest(server.url, '/videos/watch/' + video.uuid) | 68 | const { body } = await makeActivityPubGetRequest(server.url, '/videos/watch/' + video.uuid) |
69 | 69 | ||
70 | expect(body.id).to.equal('http://localhost:9002/videos/watch/' + video.uuid) | 70 | expect(body.id).to.equal('http://127.0.0.1:9002/videos/watch/' + video.uuid) |
71 | 71 | ||
72 | const videoDetails = await server.videos.get({ id: video.uuid }) | 72 | const videoDetails = await server.videos.get({ id: video.uuid }) |
73 | 73 | ||
@@ -84,7 +84,7 @@ describe('Test update host scripts', function () { | |||
84 | for (const channel of data) { | 84 | for (const channel of data) { |
85 | const { body } = await makeActivityPubGetRequest(server.url, '/video-channels/' + channel.name) | 85 | const { body } = await makeActivityPubGetRequest(server.url, '/video-channels/' + channel.name) |
86 | 86 | ||
87 | expect(body.id).to.equal('http://localhost:9002/video-channels/' + channel.name) | 87 | expect(body.id).to.equal('http://127.0.0.1:9002/video-channels/' + channel.name) |
88 | } | 88 | } |
89 | }) | 89 | }) |
90 | 90 | ||
@@ -96,7 +96,7 @@ describe('Test update host scripts', function () { | |||
96 | const usernameWithDomain = account.name | 96 | const usernameWithDomain = account.name |
97 | const { body } = await makeActivityPubGetRequest(server.url, '/accounts/' + usernameWithDomain) | 97 | const { body } = await makeActivityPubGetRequest(server.url, '/accounts/' + usernameWithDomain) |
98 | 98 | ||
99 | expect(body.id).to.equal('http://localhost:9002/accounts/' + usernameWithDomain) | 99 | expect(body.id).to.equal('http://127.0.0.1:9002/accounts/' + usernameWithDomain) |
100 | } | 100 | } |
101 | }) | 101 | }) |
102 | 102 | ||
@@ -113,17 +113,17 @@ describe('Test update host scripts', function () { | |||
113 | expect(files).to.have.lengthOf(8) | 113 | expect(files).to.have.lengthOf(8) |
114 | 114 | ||
115 | for (const file of files) { | 115 | for (const file of files) { |
116 | expect(file.magnetUri).to.contain('localhost%3A9002%2Ftracker%2Fsocket') | 116 | expect(file.magnetUri).to.contain('127.0.0.1%3A9002%2Ftracker%2Fsocket') |
117 | expect(file.magnetUri).to.contain('localhost%3A9002%2Fstatic%2F') | 117 | expect(file.magnetUri).to.contain('127.0.0.1%3A9002%2Fstatic%2F') |
118 | 118 | ||
119 | const torrent = await parseTorrentVideo(server, file) | 119 | const torrent = await parseTorrentVideo(server, file) |
120 | const announceWS = torrent.announce.find(a => a === 'ws://localhost:9002/tracker/socket') | 120 | const announceWS = torrent.announce.find(a => a === 'ws://127.0.0.1:9002/tracker/socket') |
121 | expect(announceWS).to.not.be.undefined | 121 | expect(announceWS).to.not.be.undefined |
122 | 122 | ||
123 | const announceHttp = torrent.announce.find(a => a === 'http://localhost:9002/tracker/announce') | 123 | const announceHttp = torrent.announce.find(a => a === 'http://127.0.0.1:9002/tracker/announce') |
124 | expect(announceHttp).to.not.be.undefined | 124 | expect(announceHttp).to.not.be.undefined |
125 | 125 | ||
126 | expect(torrent.urlList[0]).to.contain('http://localhost:9002/static/') | 126 | expect(torrent.urlList[0]).to.contain('http://127.0.0.1:9002/static/') |
127 | } | 127 | } |
128 | } | 128 | } |
129 | }) | 129 | }) |