in src/integratedShell.ts [61:95]
public async runTerraformTests(TestType: string, workingDirectory: string) {
if (!await isDockerInstalled()) {
TelemetryWrapper.sendError(Error("dockerNotInstalled"));
return;
}
const containerName: string = settingUtils.getImageNameForTest();
switch (TestType) {
case TestOption.lint:
await runLintInDocker(
workingDirectory + ":/tf-test/module",
containerName,
);
break;
case TestOption.e2e:
await runE2EInDocker(
workingDirectory + ":/tf-test/module",
containerName,
);
break;
case TestOption.custom:
const cmd: string = await vscode.window.showInputBox({
prompt: "Type your custom test command",
value: `run -v ${workingDirectory}:/tf-test/module --rm ${containerName} rake -f ../Rakefile build`,
});
if (!cmd) {
return;
}
await runCustomCommandInDocker(cmd, containerName);
break;
default:
break;
}
}