use of com.walmartlabs.concord.client.StartProcessResponse 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.StartProcessResponse 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.StartProcessResponse 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.StartProcessResponse 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);
}
use of com.walmartlabs.concord.client.StartProcessResponse in project concord by walmartlabs.
the class HttpTaskIT method testGet.
@Test
public void testGet() throws Exception {
URI dir = HttpTaskIT.class.getResource("httpGet").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);
assertLog(".*Out Response: true*", ab);
}
Aggregations