+ await server.run()
+
+ await server.cli.execWithEnv(`npm run update-host`)
+ })
+
+ it('Should have updated videos url', async function () {
+ const { total, data } = await server.videos.list()
+ expect(total).to.equal(2)
+
+ 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)
+
+ const videoDetails = await server.videos.get({ id: video.uuid })
+
+ expect(videoDetails.trackerUrls[0]).to.include(server.host)
+ expect(videoDetails.streamingPlaylists[0].playlistUrl).to.include(server.host)
+ expect(videoDetails.streamingPlaylists[0].segmentsSha256Url).to.include(server.host)
+ }
+ })
+
+ it('Should have updated video channels url', async function () {
+ const { data, total } = await server.channels.list({ sort: '-name' })
+ expect(total).to.equal(3)
+
+ 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)
+ }
+ })
+
+ it('Should have updated accounts url', async function () {
+ const body = await server.accounts.list()
+ expect(body.total).to.equal(3)
+
+ for (const account of body.data) {
+ const usernameWithDomain = account.name
+ const { body } = await makeActivityPubGetRequest(server.url, '/accounts/' + usernameWithDomain)