Dedupe shell command execution logic (#17516)

* Moved to shellExecutionHelper

* First crack

* fixed the deploy tests

* PR comments

* trigger GitHub actions

Co-authored-by: llali <llali@microsoft.com>
This commit is contained in:
Benjin Dubishar
2021-11-04 20:16:58 -04:00
committed by GitHub
parent f07427f2c1
commit 5160814623
7 changed files with 100 additions and 107 deletions

View File

@@ -62,10 +62,9 @@ describe('NetCoreTool: Net core tests', function (): void {
it('should run a command successfully', async function (): Promise<void> {
const netcoreTool = new NetCoreTool(testContext.outputChannel);
const dummyFile = path.join(await generateTestFolderPath(), 'dummy.dacpac');
const outputChannel = vscode.window.createOutputChannel('db project test');
try {
await netcoreTool.runStreamedCommand('echo test > ' + getQuotedPath(dummyFile), outputChannel, undefined);
await netcoreTool.runStreamedCommand('echo test > ' + getQuotedPath(dummyFile), undefined);
const text = await fs.promises.readFile(dummyFile);
should(text.toString().trim()).equal('test');
}