🌟 Data migration from nextcloud (#302)
- Files upload to Twake Drive - New logger
This commit is contained in:
@@ -0,0 +1,26 @@
|
||||
import { expect, test } from '@jest/globals';
|
||||
import { TwakeDriveClient, TwakeDriveUser } from '../src/twake_client';
|
||||
import { NextcloudMigration, NextcloudMigrationConfiguration } from '../src/nextcloud_migration';
|
||||
|
||||
//FOR LOCAL DEBUG PURPOSE ONLY, ITS NOT A TEST
|
||||
describe.skip('nextcloud migration module', () => {
|
||||
|
||||
test('upload directory', async () => {
|
||||
//given
|
||||
const subj = new NextcloudMigration({
|
||||
drive: {
|
||||
url: "http://localhost:4000",
|
||||
credentials: {
|
||||
appId: "tdrive_onlyoffice",
|
||||
secret: "c1cc66db78e1d3bb4713c55d5ab2"
|
||||
}
|
||||
}
|
||||
} as NextcloudMigrationConfiguration);
|
||||
|
||||
let user = await subj.driveClient.createUser({firstName: "DWHO", lastName: "DWHO", email: "dwho@example.com", uid: "test"});
|
||||
|
||||
//when
|
||||
await subj.upload(user, "/Users/shepilov/WebstormProjects/TDrive/Documentation/docs/onprem");
|
||||
});
|
||||
|
||||
});
|
||||
Reference in New Issue
Block a user