azdata improvements (#11516)

* azdata improvements

* Don't error on sudo command stderr either

* Improve output channel logging for commands

* Fix childprocess stuff

* pr comments

* Fix compile errors

* more pr comments
This commit is contained in:
Charles Gagnon
2020-07-28 08:43:10 -07:00
committed by GitHub
parent 3c7f2df156
commit cf6d02d2b4
12 changed files with 255 additions and 105 deletions

View File

@@ -27,7 +27,7 @@ describe('azdata', function () {
describe('findAzdata', function () {
// Mock call to --version to simulate azdata being installed
sinon.stub(childProcess, 'executeCommand').returns(Promise.resolve('v1.0.0'));
sinon.stub(childProcess, 'executeCommand').returns(Promise.resolve({ stdout: 'v1.0.0', stderr: '' }));
it('successful', async function (): Promise<void> {
sinon.stub(utils, 'searchForCmd').returns(Promise.resolve('C:\\path\\to\\azdata.cmd'));
await should(azdata.findAzdata(outputChannelMock.object)).not.be.rejected();