public async Task Check() { var client = pstep.sshClient.Connect(await pstep.GetPiloteSshConnection()); var result = client.Command("curl http://127.0.0.1:8200/v1/"); StepAssert.Contains("{", result); }
public async Task Check() { var result = commandExecute.Command("docker run --rm hello-world"); StepAssert.Contains("Hello from Docker!", result); await Task.CompletedTask; }
public async Task Check() { var client = pstep.sshClient.Connect(await pstep.GetPiloteSshConnection()); var result = client.Command("cd ~/ci && git config --get remote.origin.url"); StepAssert.Contains("https://github.com/emallard/ci.git", result); }
public async Task Check() { pstep.sshClient.Connect(await pstep.GetPiloteSshConnection()); var result = pstep.sshClient.Command("docker run --rm hello-world"); StepAssert.Contains("Hello from Docker!", result); await Task.CompletedTask; }
public async Task Check() { var client = pstep.sshClient.Connect(await pstep.GetPiloteSshConnection()); // is image here var result = client.Command("docker images"); StepAssert.Contains("ciexe", result); // try to run an image result = client.Command("docker run --rm --name ciexe ciexe hello"); StepAssert.Contains("hello", result); }
public void Check(ICommandExecute execute) { StepAssert.Contains("\"initialized\":true,\"sealed\":false", execute.Command("curl http://localhost:8200/v1/sys/health")); // login for test user var data = " --data '{\"password\": \"test\"}' "; var loginCmd = "curl --request POST " + data + " http://127.0.0.1:8200/v1/auth/userpass/login/test "; dynamic loginResponse = JObject.Parse(execute.Command(loginCmd)); var token = (string)loginResponse.auth.client_token; StepAssert.IsTrue(!string.IsNullOrWhiteSpace(token)); /* * // Try to read the test value with the test user/password * var header = " --header \"X-Vault-Token: " + token + "\" "; * var readCmd = "curl " + token + " http://127.0.0.1:8200/v1/secret/test"; * var readCmdResponse = execute.Command(readCmd); * StepAssert.AreEqual("testValue", readCmdResponse); */ }
public void Check(ICommandExecute commandExecute) { var cmdResponse = commandExecute.Command("curl -s 127.0.0.1:8080"); StepAssert.Contains("<a href=\"/dashboard/\">", cmdResponse); }