mirror of
https://github.com/NodeBB/NodeBB.git
synced 2026-03-21 20:02:03 +01:00
chore: remove deprecated socket.io user export methods [breaking]
This commit is contained in:
12
test/api.js
12
test/api.js
@@ -24,6 +24,7 @@ const plugins = require('../src/plugins');
|
||||
const flags = require('../src/flags');
|
||||
const messaging = require('../src/messaging');
|
||||
const utils = require('../src/utils');
|
||||
const api = require('../src/api');
|
||||
|
||||
describe('API', async () => {
|
||||
let readApi = false;
|
||||
@@ -190,17 +191,10 @@ describe('API', async () => {
|
||||
path: 'files/test.png',
|
||||
});
|
||||
|
||||
const socketUser = require('../src/socket.io/user');
|
||||
const socketAdmin = require('../src/socket.io/admin');
|
||||
// export data for admin user
|
||||
await socketUser.exportProfile({ uid: adminUid }, { uid: adminUid });
|
||||
await wait(2000);
|
||||
await socketUser.exportPosts({ uid: adminUid }, { uid: adminUid });
|
||||
await wait(2000);
|
||||
await socketUser.exportUploads({ uid: adminUid }, { uid: adminUid });
|
||||
await wait(2000);
|
||||
await Promise.all(['profile', 'posts', 'uploads'].map(async type => api.users.generateExport({ uid: adminUid }, { uid: adminUid, type })));
|
||||
await socketAdmin.user.exportUsersCSV({ uid: adminUid }, {});
|
||||
// wait for export child process to complete
|
||||
// wait for export child processes to complete
|
||||
await wait(5000);
|
||||
|
||||
// Attach a search hook so /api/search is enabled
|
||||
|
||||
Reference in New Issue
Block a user