Skip to content

Commit

Permalink
Fix CI tests
Browse files Browse the repository at this point in the history
  • Loading branch information
Chocobozzz committed Feb 12, 2024
1 parent ca90b8f commit 11458a7
Show file tree
Hide file tree
Showing 2 changed files with 11 additions and 3 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -50,7 +50,13 @@ describe('Object storage for video static file privacy', function () {
for (const file of getAllFiles(video)) {
const internalFileUrl = await sqlCommand.getInternalFileUrl(file.id)
expectStartWith(internalFileUrl, ObjectStorageCommand.getScalewayBaseUrl())
await makeRawRequest({ url: internalFileUrl, token: server.accessToken, expectedStatus: HttpStatusCode.FORBIDDEN_403 })

const { text } = await makeRawRequest({
url: internalFileUrl,
token: server.accessToken,
expectedStatus: HttpStatusCode.BAD_REQUEST_400
})
expect(text).to.contain('Unsupported Authorization Type')
}

const hls = getHLS(video)
Expand Down
6 changes: 4 additions & 2 deletions packages/tests/src/api/server/reverse-proxy.ts
Original file line number Diff line number Diff line change
Expand Up @@ -96,8 +96,10 @@ describe('Test application behind a reverse proxy', function () {
it('Should rate limit logins', async function () {
const user = { username: 'root', password: 'fail' }

for (let i = 0; i < 18; i++) {
await server.login.login({ user, expectedStatus: HttpStatusCode.BAD_REQUEST_400 })
for (let i = 0; i < 20; i++) {
try {
await server.login.login({ user, expectedStatus: HttpStatusCode.BAD_REQUEST_400 })
} catch {}
}

await server.login.login({ user, expectedStatus: HttpStatusCode.TOO_MANY_REQUESTS_429 })
Expand Down

0 comments on commit 11458a7

Please sign in to comment.