aboutsummaryrefslogtreecommitdiffhomepage
path: root/server
diff options
context:
space:
mode:
authorChocobozzz <me@florianbigard.com>2020-07-30 15:34:00 +0200
committerChocobozzz <chocobozzz@cpy.re>2020-07-31 11:32:04 +0200
commitf4659d73fb2d81c9a8f8d1f592ca873b622a194b (patch)
tree0aabe83d9c250c2e2951c50857d79faf2b582b4a /server
parentf0af38e69677d1afe17e48b3f5267128db3db1a4 (diff)
downloadPeerTube-f4659d73fb2d81c9a8f8d1f592ca873b622a194b.tar.gz
PeerTube-f4659d73fb2d81c9a8f8d1f592ca873b622a194b.tar.zst
PeerTube-f4659d73fb2d81c9a8f8d1f592ca873b622a194b.zip
Don't run in parallel cli and plugin tests
Diffstat (limited to 'server')
-rw-r--r--server/tests/client.ts6
-rw-r--r--server/tests/misc-endpoints.ts14
2 files changed, 11 insertions, 9 deletions
diff --git a/server/tests/client.ts b/server/tests/client.ts
index 648d46414..2d8468c06 100644
--- a/server/tests/client.ts
+++ b/server/tests/client.ts
@@ -163,8 +163,10 @@ describe('Test a client controllers', function () {
163 .set('Accept', 'text/html') 163 .set('Accept', 'text/html')
164 .expect(200) 164 .expect(200)
165 165
166 const expectedLink = '<link rel="alternate" type="application/json+oembed" href="http://localhost:9001/services/oembed?' + 166 const port = server.port
167 `url=http%3A%2F%2Flocalhost%3A9001%2Fvideos%2Fwatch%2F${server.video.uuid}" ` + 167
168 const expectedLink = '<link rel="alternate" type="application/json+oembed" href="http://localhost:' + port + '/services/oembed?' +
169 `url=http%3A%2F%2Flocalhost%3A${port}%2Fvideos%2Fwatch%2F${server.video.uuid}" ` +
168 `title="${server.video.name}" />` 170 `title="${server.video.name}" />`
169 171
170 expect(res.text).to.contain(expectedLink) 172 expect(res.text).to.contain(expectedLink)
diff --git a/server/tests/misc-endpoints.ts b/server/tests/misc-endpoints.ts
index 32b035c9e..3d0224323 100644
--- a/server/tests/misc-endpoints.ts
+++ b/server/tests/misc-endpoints.ts
@@ -122,7 +122,7 @@ describe('Test misc endpoints', function () {
122 }) 122 })
123 123
124 expect(res.text).to.contain('xmlns="http://www.sitemaps.org/schemas/sitemap/0.9"') 124 expect(res.text).to.contain('xmlns="http://www.sitemaps.org/schemas/sitemap/0.9"')
125 expect(res.text).to.contain('<url><loc>http://localhost:9001/about/instance</loc></url>') 125 expect(res.text).to.contain('<url><loc>http://localhost:' + server.port + '/about/instance</loc></url>')
126 }) 126 })
127 127
128 it('Should get the empty cached sitemap', async function () { 128 it('Should get the empty cached sitemap', async function () {
@@ -133,7 +133,7 @@ describe('Test misc endpoints', function () {
133 }) 133 })
134 134
135 expect(res.text).to.contain('xmlns="http://www.sitemaps.org/schemas/sitemap/0.9"') 135 expect(res.text).to.contain('xmlns="http://www.sitemaps.org/schemas/sitemap/0.9"')
136 expect(res.text).to.contain('<url><loc>http://localhost:9001/about/instance</loc></url>') 136 expect(res.text).to.contain('<url><loc>http://localhost:' + server.port + '/about/instance</loc></url>')
137 }) 137 })
138 138
139 it('Should add videos, channel and accounts and get sitemap', async function () { 139 it('Should add videos, channel and accounts and get sitemap', async function () {
@@ -156,17 +156,17 @@ describe('Test misc endpoints', function () {
156 }) 156 })
157 157
158 expect(res.text).to.contain('xmlns="http://www.sitemaps.org/schemas/sitemap/0.9"') 158 expect(res.text).to.contain('xmlns="http://www.sitemaps.org/schemas/sitemap/0.9"')
159 expect(res.text).to.contain('<url><loc>http://localhost:9001/about/instance</loc></url>') 159 expect(res.text).to.contain('<url><loc>http://localhost:' + server.port + '/about/instance</loc></url>')
160 160
161 expect(res.text).to.contain('<video:title>video 1</video:title>') 161 expect(res.text).to.contain('<video:title>video 1</video:title>')
162 expect(res.text).to.contain('<video:title>video 2</video:title>') 162 expect(res.text).to.contain('<video:title>video 2</video:title>')
163 expect(res.text).to.not.contain('<video:title>video 3</video:title>') 163 expect(res.text).to.not.contain('<video:title>video 3</video:title>')
164 164
165 expect(res.text).to.contain('<url><loc>http://localhost:9001/video-channels/channel1</loc></url>') 165 expect(res.text).to.contain('<url><loc>http://localhost:' + server.port + '/video-channels/channel1</loc></url>')
166 expect(res.text).to.contain('<url><loc>http://localhost:9001/video-channels/channel2</loc></url>') 166 expect(res.text).to.contain('<url><loc>http://localhost:' + server.port + '/video-channels/channel2</loc></url>')
167 167
168 expect(res.text).to.contain('<url><loc>http://localhost:9001/accounts/user1</loc></url>') 168 expect(res.text).to.contain('<url><loc>http://localhost:' + server.port + '/accounts/user1</loc></url>')
169 expect(res.text).to.contain('<url><loc>http://localhost:9001/accounts/user2</loc></url>') 169 expect(res.text).to.contain('<url><loc>http://localhost:' + server.port + '/accounts/user2</loc></url>')
170 }) 170 })
171 }) 171 })
172 172