public void ExecuteAndForget_EchoArgsToStdout_Test() { using (var cli = new Cli(_echoArgsToStdoutBat)) { cli.ExecuteAndForget(TestString); } }
public void ExecuteAndForget_EchoStdin_Test() { var cli = new Cli(EchoStdinBat); var input = new ExecutionInput(standardInput: "Hello world"); cli.ExecuteAndForget(input); }
public async Task RunCompose(string yaml) { File.WriteAllText(Path.Combine(_executionPath, "docker-compose.yml"), yaml); ExecutionInput input = new ExecutionInput($@"-p {_projectName} -f {_executionPath}\docker-compose.yml up"); _cliCompose.ExecuteAndForget(input); await WaitForContainerToDie(); ComposeDown(); }
public static async Task Start(string companyName, MicroServiceEntity entity) { var projectName = Constants.appNamePrefix + entity.Name.Kebaberize(); var projectPath = await GoFilePaths.GetProjectPath(companyName, entity.Name); await GoCommands.Build(projectPath); var buildPath = Path.Combine(projectPath, projectName + ".exe"); var port = MachinePorts.GetAvailablePort(3000); var runLocation = $"localhost:{port}"; Console.WriteLine($"Attempting to run {entity.Name} at {runLocation}"); using (var cli = new Cli(buildPath)) { cli.ExecuteAndForget(runLocation); Console.WriteLine($"{entity.Name} running at {runLocation}"); } }
public void ExecuteAndForget_ThrowError_Test() { var cli = new Cli(ThrowErrorBat); cli.ExecuteAndForget(); }
public void ExecuteAndForget_EchoArgs_Test() { var cli = new Cli(EchoArgsBat); cli.ExecuteAndForget("Hello world"); }