Add azdata tests (#11745)

This commit is contained in:
Charles Gagnon
2020-08-12 09:02:42 -07:00
committed by GitHub
parent 00af075fb3
commit 01ea89a461
2 changed files with 57 additions and 14 deletions

View File

@@ -48,8 +48,12 @@ describe('azdata', function () {
});
// TODO: Install not implemented on linux yet
describe.skip('downloadAndInstallAzdata', function (): void {
describe('downloadAndInstallAzdata', function (): void {
it('successful download & install', async function (): Promise<void> {
sinon.stub(childProcess, 'executeCommand').returns(Promise.resolve({ stdout: '', stderr: '' }));
if (process.platform === 'linux') {
sinon.stub(childProcess, 'executeSudoCommand').returns(Promise.resolve({ stdout: '', stderr: '' }));
}
nock(azdata.azdataHostname)
.get(`/${azdata.azdataUri}`)
.replyWithFile(200, __filename);