Stop exposing Syncer from SyncClient
This commit is contained in:
parent
93b43f57b7
commit
2722f7c7fc
11 changed files with 84 additions and 55 deletions
|
|
@ -134,9 +134,7 @@ export class MockAgent extends MockClient {
|
|||
public async finish(): Promise<void> {
|
||||
await this.client.setSetting("isSyncEnabled", true);
|
||||
await Promise.all(this.pendingActions);
|
||||
this.client.stop();
|
||||
await this.client.syncer.waitForSyncQueue();
|
||||
await this.client.syncer.applyRemoteChangesLocally();
|
||||
await this.client.waitAndStop();
|
||||
}
|
||||
|
||||
public assertFileSystemsAreConsistent(otherAgent: MockAgent): void {
|
||||
|
|
|
|||
|
|
@ -72,7 +72,7 @@ export class MockClient implements FileSystemOperations {
|
|||
this.localFiles.set(path, newContent);
|
||||
|
||||
this.runCallback(() => {
|
||||
void this.client.syncer.syncLocallyCreatedFile(path);
|
||||
void this.client.syncLocallyCreatedFile(path);
|
||||
});
|
||||
}
|
||||
|
||||
|
|
@ -114,7 +114,7 @@ export class MockClient implements FileSystemOperations {
|
|||
);
|
||||
|
||||
this.runCallback(() => {
|
||||
void this.client.syncer.syncLocallyUpdatedFile({
|
||||
void this.client.syncLocallyUpdatedFile({
|
||||
relativePath: path
|
||||
});
|
||||
});
|
||||
|
|
@ -132,11 +132,11 @@ export class MockClient implements FileSystemOperations {
|
|||
|
||||
this.runCallback(() => {
|
||||
if (hasExisted) {
|
||||
void this.client.syncer.syncLocallyUpdatedFile({
|
||||
void this.client.syncLocallyUpdatedFile({
|
||||
relativePath: path
|
||||
});
|
||||
} else {
|
||||
void this.client.syncer.syncLocallyCreatedFile(path);
|
||||
void this.client.syncLocallyCreatedFile(path);
|
||||
}
|
||||
});
|
||||
}
|
||||
|
|
@ -148,7 +148,7 @@ export class MockClient implements FileSystemOperations {
|
|||
this.localFiles.delete(path);
|
||||
|
||||
this.runCallback(() => {
|
||||
void this.client.syncer.syncLocallyDeletedFile(path);
|
||||
void this.client.syncLocallyDeletedFile(path);
|
||||
});
|
||||
}
|
||||
|
||||
|
|
@ -170,7 +170,7 @@ export class MockClient implements FileSystemOperations {
|
|||
);
|
||||
|
||||
this.runCallback(() => {
|
||||
void this.client.syncer.syncLocallyUpdatedFile({
|
||||
void this.client.syncLocallyUpdatedFile({
|
||||
oldPath,
|
||||
relativePath: newPath
|
||||
});
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue