Fix encoding of uris for data protocol (#6723)

* fix encoding or uris

* fix tests
This commit is contained in:
Anthony Dresser
2019-08-13 09:58:16 -07:00
committed by GitHub
parent bb010b2e53
commit 6fd4b5eaf2
4 changed files with 18 additions and 18 deletions

View File

@@ -13,11 +13,11 @@ const msInH = 3.6e6;
const msInM = 60000;
const msInS = 1000;
export const uriPrefixes = {
default: 'connection://',
connection: 'connection://',
dashboard: 'dashboard://',
insights: 'insights://',
notebook: 'notebook://'
default: 'connection:',
connection: 'connection:',
dashboard: 'dashboard:',
insights: 'insights:',
notebook: 'notebook:'
};

View File

@@ -217,7 +217,7 @@ suite('SQL ConnectionManagementService tests', () => {
let connectionToUse = connection ? connection : connectionProfile;
return new Promise<IConnectionResult>((resolve, reject) => {
let id = connectionToUse.getOptionsKey();
let defaultUri = 'connection://' + (id ? id : connectionToUse.serverName + ':' + connectionToUse.databaseName);
let defaultUri = 'connection:' + (id ? id : connectionToUse.serverName + ':' + connectionToUse.databaseName);
connectionManagementService.onConnectionRequestSent(() => {
let info: azdata.ConnectionInfoSummary = {
connectionId: error ? undefined : 'id',

View File

@@ -228,7 +228,7 @@ suite('SQL ConnectionStatusManager tests', () => {
//Verify database name changed after connection is complete
connections.updateDatabaseName(summary);
connectionStatus = connections.findConnection(connection3Id);
let ownerUriWithDbName = Utils.generateUriWithPrefix(connectionStatus.connectionProfile, 'connection://');
let ownerUriWithDbName = Utils.generateUriWithPrefix(connectionStatus.connectionProfile, 'connection:');
//The uri assigned to connection without db name should be the original one
let connectionWitDbStatus = connections.getOriginalOwnerUri(ownerUriWithDbName);