use of com.walmartlabs.concord.client.ProcessEntry 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.ProcessEntry 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.ProcessEntry 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);
}
use of com.walmartlabs.concord.client.ProcessEntry in project concord by walmartlabs.
the class HttpTaskIT method testGetWithIgnoreErrors.
@Test
public void testGetWithIgnoreErrors() throws Exception {
URI dir = HttpTaskIT.class.getResource("httpGetWithIgnoreErrors").toURI();
byte[] payload = archive(dir);
Map<String, Object> input = new HashMap<>();
input.put("archive", payload);
input.put("arguments.user", "wrongUsername");
input.put("arguments.password", "wrongPassword");
input.put("arguments.url", mockHttpBaseUrl + rule.getPort() + mockHttpPathUnauthorized);
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(".*statusCode: 401*", ab);
assertLog(".*Success response: false*", ab);
}
use of com.walmartlabs.concord.client.ProcessEntry in project concord by walmartlabs.
the class HttpTaskIT method testPatch.
@Test
public void testPatch() throws Exception {
URI dir = HttpTaskIT.class.getResource("httpPatch").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);
}
Aggregations