use of com.walmartlabs.concord.client.ProcessApi in project concord by walmartlabs.
the class HttpTaskIT method testPostWithDebug.
@Test
public void testPostWithDebug() throws Exception {
URI dir = HttpTaskIT.class.getResource("httpPostWithDebug").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(".*requestInfo.*", ab);
assertLog(".*responseInfo.*", ab);
}
use of com.walmartlabs.concord.client.ProcessApi in project concord by walmartlabs.
the class HttpTaskIT method testGetWithHeaders.
@Test
public void testGetWithHeaders() throws Exception {
URI dir = HttpTaskIT.class.getResource("httpGetWithHeaders").toURI();
byte[] payload = archive(dir);
Map<String, Object> input = new HashMap<>();
input.put("archive", payload);
input.put("arguments.url", mockHttpBaseUrl + rule.getPort() + mockHttpPathHeaders);
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);
assertLog(".*Response content: request headers:.*h1=v1.*", ab);
assertLog(".*Response content: request headers:.*h2=v2.*", ab);
}
use of com.walmartlabs.concord.client.ProcessApi in project concord by walmartlabs.
the class HttpTaskIT method testPostWithAuthUsingToken.
@Test
public void testPostWithAuthUsingToken() throws Exception {
URI dir = HttpTaskIT.class.getResource("httpPostWithAuthUsingToken").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() + mockHttpPathToken);
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.ProcessApi in project concord by walmartlabs.
the class HttpTaskIT method testGetWithAuthUsingToken.
@Test
public void testGetWithAuthUsingToken() throws Exception {
URI dir = HttpTaskIT.class.getResource("httpGetWithAuthUsingToken").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() + mockHttpPathToken);
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.ProcessApi in project concord by walmartlabs.
the class HttpTaskIT method testGetWithQueryParams.
@Test
public void testGetWithQueryParams() throws Exception {
URI dir = HttpTaskIT.class.getResource("httpGetWithQueryParams").toURI();
byte[] payload = archive(dir);
ProcessApi processApi = new ProcessApi(getApiClient());
Map<String, Object> input = new HashMap<>();
input.put("archive", payload);
input.put("arguments.url", mockHttpBaseUrl + rule.getPort() + mockHttpPathQueryParams);
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(".*message: hello concord!*", ab);
assertLog(".*multi-value-1: value1*", ab);
assertLog(".*multi-value-2: value2*", ab);
}
Aggregations