public void ProcessGeneralCommandAsBatch(string[] commands, bool runAsBatch) { var commandLineExecution = new CommandLineExecutionProvider(); var output = commandLineExecution.ProcessCommands(commands, runAsBatch); Assert.NotEmpty(output); }
public void ProcessFileSystemCommandAs(string[] commands, bool runAsBatch) { var commandLineExecution = new CommandLineExecutionProvider(); var output = commandLineExecution.ProcessCommands(commands, runAsBatch); Assert.NotEmpty(output); Assert.Contains("eun555", output); }
public void ProcessEnvironmentCommandAsBatch(string[] commands, bool runAsBatch) { var commandLineExecution = new CommandLineExecutionProvider(); var output = commandLineExecution.ProcessCommands(commands, runAsBatch); Assert.NotEmpty(output); Assert.Contains("HOME", output); }
public void ProcessCommandForUnix(string[] commands, bool runAsBatch) { var commandLineExecution = new CommandLineExecutionProvider(); var timeoutMs = 20000; var output = commandLineExecution.ProcessCommands(commands, runAsBatch, timeoutMs); Assert.NotEmpty(output); }
public void ProcessCommandForTimeoutTest(string[] commands, bool runAsBatch) { var commandLineExecution = new CommandLineExecutionProvider(); var timeoutMs = 5000; Exception ex = Assert.Throws <TimeoutException>(() => commandLineExecution.ProcessCommands(commands, runAsBatch, timeoutMs)); Assert.Equal($"Process did not finish in {timeoutMs} ms.", ex.Message); }
public void ProcessCommandForUnix2(string command) { var commandLineExecution = new CommandLineExecutionProvider(); var output = ""; commandLineExecution.ExecuteUnixCommand(command); Assert.Empty(output); }
public void ProcessWindowsDirCommand(string[] commands, bool runAsBatch) { if (OsPlatform == System.Runtime.InteropServices.OSPlatform.Windows) { var commandLineExecution = new CommandLineExecutionProvider(); var output = commandLineExecution.ProcessCommands(commands, runAsBatch); Assert.NotEmpty(output); Assert.Contains("Program", output); } }
public void ProcessWindowsCommandAsBatchForTimeoutTest(string[] commands, bool runAsBatch) { if (OsPlatform == System.Runtime.InteropServices.OSPlatform.Windows) { var commandLineExecution = new CommandLineExecutionProvider(); var timeoutMs = 1000; Exception ex = Assert.Throws <TimeoutException>(() => commandLineExecution.ProcessCommands(commands, runAsBatch, timeoutMs)); Assert.Equal($"Process did not finish in {timeoutMs} ms.", ex.Message); } }
public void ProcessCommands2(string[] commands, bool runAsBatch) { var timeoutMs = 30000; var commandLineExecution = new CommandLineExecutionProvider(); var output = commandLineExecution.ProcessCommands(commands, runAsBatch, timeoutMs); Assert.NotEmpty(output); Assert.Contains("temp", output); Assert.Contains("blob", output); }
public void ProcessWindowsFileSystemCommands(string[] commands, bool runAsBatch) { if (OsPlatform == System.Runtime.InteropServices.OSPlatform.Windows) { var timeoutMs = 30000; var commandLineExecution = new CommandLineExecutionProvider(); var output = commandLineExecution.ProcessCommands(commands, runAsBatch, timeoutMs); Assert.NotEmpty(output); Assert.Contains("temp", output); Assert.Contains("blob", output); } }