Re-enable akismet test now 8.2 is released

This commit is contained in:
Chocobozzz
2026-06-11 11:15:10 +02:00
parent 9f4127e616
commit 5a080d03ac
2 changed files with 19 additions and 20 deletions
+17 -18
View File
@@ -1,6 +1,6 @@
/* oxlint-disable @typescript-eslint/no-unused-expressions,@typescript-eslint/require-await */
import { HttpStatusCode } from '@peertube/peertube-models'
import { HttpStatusCode, UserRegistrationState } from '@peertube/peertube-models'
import {
cleanupTests,
createMultipleServers,
@@ -149,25 +149,24 @@ describe('Official plugin Akismet', function () {
})
})
// TODO: Enable when 8.2 is released
// it('Should detect a signup as SPAM and set it as approval', async function () {
// await servers[0].plugins.updateSettings({
// npmName: 'peertube-plugin-akismet',
// settings: {
// 'akismet-api-key': process.env.AKISMET_KEY,
// 'akismet-spam-marked-user-registration-strategy': 'mark-for-approval'
// }
// })
it('Should detect a signup as SPAM and set it as approval', async function () {
await servers[0].plugins.updateSettings({
npmName: 'peertube-plugin-akismet',
settings: {
'akismet-api-key': process.env.AKISMET_KEY,
'akismet-spam-marked-user-registration-strategy': 'mark-for-approval'
}
})
// const { state } = await servers[0].registrations.register({
// username: 'user2',
// displayName: 'user 2',
// email: 'akismet-guaranteed-spam@example.com',
// expectedStatus: HttpStatusCode.OK_200
// })
const { state } = await servers[0].registrations.register({
username: 'user2',
displayName: 'user 2',
email: 'akismet-guaranteed-spam@example.com',
expectedStatus: HttpStatusCode.OK_200
})
// expect(state.id).to.equal(UserRegistrationState.PENDING)
// })
expect(state.id).to.equal(UserRegistrationState.PENDING)
})
})
after(async function () {
@@ -37,8 +37,8 @@ describe('Test plugin installation when pnpm store changes', function () {
await server.run(undefined, {
env: {
npm_config_store_dir: firstStoreDir, // PNPM <= 10
pnpm_config_store_dir: firstStoreDir // PNPM > 11
npm_config_store_dir: secondStoreDir, // PNPM <= 10
pnpm_config_store_dir: secondStoreDir // PNPM > 11
}
})