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:
Sakshi Sharma
2020-06-24 14:03:02 -07:00
committed by GitHub
parent 561b881200
commit de263eacd1
5 changed files with 331 additions and 162 deletions

View File

@@ -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;
}