aboutsummaryrefslogtreecommitdiffhomepage
path: root/server/tests
diff options
context:
space:
mode:
authorChocobozzz <me@florianbigard.com>2022-09-27 16:23:04 +0200
committerChocobozzz <me@florianbigard.com>2022-09-27 16:23:04 +0200
commitca68986083edfc530985f47007a099b94cd65325 (patch)
treef5c86d8480bc864919fa8c2583eee301faddd9ad /server/tests
parent97922ecf640eb449f0664f23f9f69eeb4d9f5cd9 (diff)
parent2b32c5b37e0b10261a108cc7c23b72d64f806576 (diff)
downloadPeerTube-ca68986083edfc530985f47007a099b94cd65325.tar.gz
PeerTube-ca68986083edfc530985f47007a099b94cd65325.tar.zst
PeerTube-ca68986083edfc530985f47007a099b94cd65325.zip
Merge branch 'release/4.3.0' into develop
Diffstat (limited to 'server/tests')
-rw-r--r--server/tests/api/notifications/moderation-notifications.ts2
-rw-r--r--server/tests/misc-endpoints.ts18
2 files changed, 19 insertions, 1 deletions
diff --git a/server/tests/api/notifications/moderation-notifications.ts b/server/tests/api/notifications/moderation-notifications.ts
index da9bd1196..fc953f144 100644
--- a/server/tests/api/notifications/moderation-notifications.ts
+++ b/server/tests/api/notifications/moderation-notifications.ts
@@ -601,7 +601,7 @@ describe('Test moderation notifications', function () {
601 }) 601 })
602 602
603 it('Should not send a notification to moderators on new video without auto-blacklist', async function () { 603 it('Should not send a notification to moderators on new video without auto-blacklist', async function () {
604 this.timeout(60000) 604 this.timeout(120000)
605 605
606 const name = 'video without auto-blacklist ' + buildUUID() 606 const name = 'video without auto-blacklist ' + buildUUID()
607 607
diff --git a/server/tests/misc-endpoints.ts b/server/tests/misc-endpoints.ts
index 9e404b549..663ac044a 100644
--- a/server/tests/misc-endpoints.ts
+++ b/server/tests/misc-endpoints.ts
@@ -3,6 +3,7 @@
3import { expect } from 'chai' 3import { expect } from 'chai'
4import { cleanupTests, createSingleServer, makeGetRequest, PeerTubeServer, setAccessTokensToServers } from '@shared/server-commands' 4import { cleanupTests, createSingleServer, makeGetRequest, PeerTubeServer, setAccessTokensToServers } from '@shared/server-commands'
5import { HttpStatusCode, VideoPrivacy } from '@shared/models' 5import { HttpStatusCode, VideoPrivacy } from '@shared/models'
6import { expectLogDoesNotContain } from './shared'
6 7
7describe('Test misc endpoints', function () { 8describe('Test misc endpoints', function () {
8 let server: PeerTubeServer 9 let server: PeerTubeServer
@@ -183,6 +184,23 @@ describe('Test misc endpoints', function () {
183 expect(res.text).to.contain('<url><loc>http://localhost:' + server.port + '/accounts/user1</loc></url>') 184 expect(res.text).to.contain('<url><loc>http://localhost:' + server.port + '/accounts/user1</loc></url>')
184 expect(res.text).to.contain('<url><loc>http://localhost:' + server.port + '/accounts/user2</loc></url>') 185 expect(res.text).to.contain('<url><loc>http://localhost:' + server.port + '/accounts/user2</loc></url>')
185 }) 186 })
187
188 it('Should not fail with big title/description videos', async function () {
189 const name = 'v'.repeat(115)
190
191 await server.videos.upload({ attributes: { name, description: 'd'.repeat(2500), nsfw: false } })
192
193 const res = await makeGetRequest({
194 url: server.url,
195 path: '/sitemap.xml?t=2', // avoid using cache
196 expectedStatus: HttpStatusCode.OK_200
197 })
198
199 await expectLogDoesNotContain(server, 'Warning in sitemap generation')
200 await expectLogDoesNotContain(server, 'Error in sitemap generation')
201
202 expect(res.text).to.contain(`<video:title>${'v'.repeat(97)}...</video:title>`)
203 })
186 }) 204 })
187 205
188 after(async function () { 206 after(async function () {