use of com.walmartlabs.concord.client.ProcessEntry in project concord by walmartlabs.
the class AnsibleRetryIT method testSaveRetry.
@Test
public void testSaveRetry() throws Exception {
URI uri = ProcessIT.class.getResource("ansibleSaveRetry").toURI();
byte[] payload = archive(uri, ITConstants.DEPENDENCIES_DIR);
// start the process
ProcessApi processApi = new ProcessApi(getApiClient());
StartProcessResponse spr = start(payload);
// wait for completion
ProcessEntry pir = waitForCompletion(processApi, spr.getInstanceId());
assertEquals(ProcessEntry.StatusEnum.FAILED, pir.getStatus());
// retrieve the retry file
File r = processApi.downloadAttachment(pir.getInstanceId(), "hello.retry");
assertNotNull(r);
}
use of com.walmartlabs.concord.client.ProcessEntry in project concord by walmartlabs.
the class HttpTaskIT method testFollowRedirects.
@Test
public void testFollowRedirects() throws Exception {
URI dir = HttpTaskIT.class.getResource("httpFollowRedirects").toURI();
byte[] payload = archive(dir);
Map<String, Object> input = new HashMap<>();
input.put("archive", payload);
input.put("arguments.authToken", mockHttpAuthToken);
input.put("arguments.url", mockHttpBaseUrl + rule.getPort() + mockHttpPathFollowRedirects);
StartProcessResponse spr = start(input);
ProcessApi processApi = new ProcessApi(getApiClient());
ProcessEntry pir = waitForCompletion(processApi, spr.getInstanceId());
assertEquals(ProcessEntry.StatusEnum.FINISHED, pir.getStatus());
byte[] ab = getLog(pir.getLogFileName());
assertLog(".*Response status code: 302.*", ab);
}
use of com.walmartlabs.concord.client.ProcessEntry in project concord by walmartlabs.
the class HttpTaskIT method testGetWithAuthUsingPassword.
@Test
public void testGetWithAuthUsingPassword() throws Exception {
URI dir = HttpTaskIT.class.getResource("httpGetWithAuthUsingPassword").toURI();
byte[] payload = archive(dir);
Map<String, Object> input = new HashMap<>();
input.put("archive", payload);
input.put("arguments.user", mockHttpAuthUser);
input.put("arguments.password", mockHttpAuthPassword);
input.put("arguments.url", mockHttpBaseUrl + rule.getPort() + mockHttpPathPassword);
StartProcessResponse spr = start(input);
ProcessApi processApi = new ProcessApi(getApiClient());
ProcessEntry pir = waitForCompletion(processApi, spr.getInstanceId());
assertEquals(ProcessEntry.StatusEnum.FINISHED, pir.getStatus());
byte[] ab = getLog(pir.getLogFileName());
assertLog(".*Success response.*", ab);
assertLog(".*Out Response: true*", ab);
}
use of com.walmartlabs.concord.client.ProcessEntry in project concord by walmartlabs.
the class HttpTaskIT method testPost.
@Test
public void testPost() throws Exception {
URI dir = HttpTaskIT.class.getResource("httpPost").toURI();
byte[] payload = archive(dir);
Map<String, Object> input = new HashMap<>();
input.put("archive", payload);
input.put("arguments.user", mockHttpAuthUser);
input.put("arguments.password", mockHttpAuthPassword);
input.put("arguments.url", mockHttpBaseUrl + rule.getPort() + mockHttpPathPassword);
StartProcessResponse spr = start(input);
ProcessApi processApi = new ProcessApi(getApiClient());
ProcessEntry pir = waitForCompletion(processApi, spr.getInstanceId());
assertEquals(ProcessEntry.StatusEnum.FINISHED, pir.getStatus());
byte[] ab = getLog(pir.getLogFileName());
assertLog(".*Success response.*", ab);
assertLog(".*Out Response: true*", ab);
}
use of com.walmartlabs.concord.client.ProcessEntry in project concord by walmartlabs.
the class HttpTaskIT method testGetAsString.
@Test
public void testGetAsString() throws Exception {
URI dir = HttpTaskIT.class.getResource("httpGetAsString").toURI();
byte[] payload = archive(dir);
ProcessApi processApi = new ProcessApi(getApiClient());
Map<String, Object> input = new HashMap<>();
input.put("archive", payload);
input.put("arguments.url", SERVER_URL + mockHttpPathPing);
StartProcessResponse spr = start(input);
ProcessEntry pir = waitForCompletion(processApi, spr.getInstanceId());
assertEquals(ProcessEntry.StatusEnum.FINISHED, pir.getStatus());
byte[] ab = getLog(pir.getLogFileName());
assertLog(".*Success response.*", ab);
}
Aggregations