mirror of
https://github.com/ckaczor/azuredatastudio.git
synced 2026-02-16 18:46:40 -05:00
Schema Compare test coverage (#11042)
* Few tests for Schema Compare * Addressed comment- removed wait in test * Split setEndpointInfo for database and dacpac
This commit is contained in:
@@ -99,3 +99,24 @@ export async function shouldThrowSpecificError(block: Function, expectedMessage:
|
||||
throw new AssertionError({ message: `Operation succeeded, but expected failure with exception: "${expectedMessage}".${details ? ' ' + details : ''}` });
|
||||
}
|
||||
}
|
||||
|
||||
export async function setDacpacEndpointInfo(path: string): Promise<mssql.SchemaCompareEndpointInfo> {
|
||||
let endpointInfo: mssql.SchemaCompareEndpointInfo;
|
||||
|
||||
endpointInfo = { ...mockDacpacEndpoint };
|
||||
endpointInfo.packageFilePath = path;
|
||||
|
||||
return endpointInfo;
|
||||
}
|
||||
|
||||
export async function setDatabaseEndpointInfo(): Promise<mssql.SchemaCompareEndpointInfo> {
|
||||
let endpointInfo: mssql.SchemaCompareEndpointInfo;
|
||||
let dbName = 'My Database';
|
||||
let serverName = 'My Server';
|
||||
|
||||
endpointInfo = { ...mockDatabaseEndpoint };
|
||||
endpointInfo.databaseName = dbName;
|
||||
endpointInfo.serverName = serverName;
|
||||
|
||||
return endpointInfo;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user