Deprecate workspace datasoure (#16507)
This commit is contained in:
+2
-2
@@ -93,9 +93,9 @@ describe('GoogleAPIsService', () => {
|
||||
|
||||
return {};
|
||||
}),
|
||||
getDataSourceForWorkspace: jest
|
||||
getGlobalWorkspaceDataSource: jest
|
||||
.fn()
|
||||
.mockImplementation(() => mockWorkspaceDataSource),
|
||||
.mockResolvedValue(mockWorkspaceDataSource),
|
||||
executeInWorkspaceContext: jest
|
||||
.fn()
|
||||
.mockImplementation((_authContext: any, fn: () => any) => fn()),
|
||||
|
||||
@@ -126,9 +126,7 @@ export class GoogleAPIsService {
|
||||
);
|
||||
|
||||
const workspaceDataSource =
|
||||
await this.globalWorkspaceOrmManager.getDataSourceForWorkspace(
|
||||
workspaceId,
|
||||
);
|
||||
await this.globalWorkspaceOrmManager.getGlobalWorkspaceDataSource();
|
||||
|
||||
await workspaceDataSource.transaction(
|
||||
async (manager: WorkspaceEntityManager) => {
|
||||
|
||||
+2
-2
@@ -92,9 +92,9 @@ describe('MicrosoftAPIsService', () => {
|
||||
|
||||
return {};
|
||||
}),
|
||||
getDataSourceForWorkspace: jest
|
||||
getGlobalWorkspaceDataSource: jest
|
||||
.fn()
|
||||
.mockImplementation(() => mockWorkspaceDataSource),
|
||||
.mockResolvedValue(mockWorkspaceDataSource),
|
||||
executeInWorkspaceContext: jest
|
||||
.fn()
|
||||
.mockImplementation((_authContext: any, fn: () => any) => fn()),
|
||||
|
||||
+1
-3
@@ -107,9 +107,7 @@ export class MicrosoftAPIsService {
|
||||
);
|
||||
|
||||
const workspaceDataSource =
|
||||
await this.globalWorkspaceOrmManager.getDataSourceForWorkspace(
|
||||
workspaceId,
|
||||
);
|
||||
await this.globalWorkspaceOrmManager.getGlobalWorkspaceDataSource();
|
||||
|
||||
await workspaceDataSource.transaction(
|
||||
async (manager: WorkspaceEntityManager) => {
|
||||
|
||||
Reference in New Issue
Block a user