Notebooks: Only have One Connection in Attach To Dropdown (#8582)

* Have only one connection in attach to dropdown

* LGTM fixes

* Test fixes not unnecessarily changing context 2x

* PR Feedback
This commit is contained in:
Chris LaFreniere
2019-12-08 11:03:51 -08:00
committed by GitHub
parent de177c0335
commit 62565e0577
11 changed files with 94 additions and 321 deletions

View File

@@ -271,3 +271,21 @@ export async function assertTableCreationResult(databaseName: string, schema: st
assert(result.columnInfo[0].columnName !== 'ErrorMessage', `Checking for table creation threw error ${result.rows[0][0].displayValue}`);
}
}
export function testServerProfileToIConnectionProfile(serverProfile: TestServerProfile): azdata.IConnectionProfile {
return {
serverName: serverProfile.serverName,
databaseName: serverProfile.database,
authenticationType: serverProfile.authenticationTypeName,
providerName: serverProfile.providerName,
connectionName: '',
userName: serverProfile.userName,
password: serverProfile.password,
savePassword: false,
groupFullName: undefined,
saveProfile: true,
id: undefined,
groupId: undefined,
options: {}
};
}