use of com.walmartlabs.concord.client.ProcessEntry 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);
}
use of com.walmartlabs.concord.client.ProcessEntry in project concord by walmartlabs.
the class HttpTaskIT method testGetWithInvalidUrl.
@Test
public void testGetWithInvalidUrl() throws Exception {
URI dir = HttpTaskIT.class.getResource("httpGetWithInvalidUrl").toURI();
byte[] payload = archive(dir);
ProcessApi processApi = new ProcessApi(getApiClient());
StartProcessResponse spr = start(payload);
ProcessEntry pir = waitForCompletion(processApi, spr.getInstanceId());
assertEquals(ProcessEntry.StatusEnum.FAILED, pir.getStatus());
byte[] ab = getLog(pir.getLogFileName());
assertLog(".*server not exists.*", ab);
}
use of com.walmartlabs.concord.client.ProcessEntry in project concord by walmartlabs.
the class HttpTaskIT method testGetEmptyResponse.
@Test
public void testGetEmptyResponse() throws Exception {
URI dir = HttpTaskIT.class.getResource("httpGetEmpty").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() + mockHttpPathEmpty);
StartProcessResponse spr = start(input);
ProcessEntry pir = waitForCompletion(processApi, spr.getInstanceId());
assertEquals(ProcessEntry.StatusEnum.FINISHED, pir.getStatus());
byte[] ab = getLog(pir.getLogFileName());
assertLog(".*Success response: true.*", ab);
assertLog(".*Content is NULL: true.*", ab);
}
use of com.walmartlabs.concord.client.ProcessEntry in project concord by walmartlabs.
the class ConfigurableResourcesIT method testDisabledProfiles.
@Test
public void testDisabledProfiles() throws Exception {
// prepare the payload
byte[] payload = archive(ProcessIT.class.getResource("disableProfilesDirectory").toURI());
// start the process
ProcessApi processApi = new ProcessApi(getApiClient());
StartProcessResponse spr = start(payload);
assertNotNull(spr.getInstanceId());
// wait for completion
ProcessEntry pir = waitForCompletion(processApi, spr.getInstanceId());
// get the name of the agent's log file
assertNotNull(pir.getLogFileName());
// check the logs
byte[] ab = getLog(pir.getLogFileName());
assertLog(".*Hello, stranger.*", ab);
}
use of com.walmartlabs.concord.client.ProcessEntry in project concord by walmartlabs.
the class ConfigurableResourcesIT method testFlows.
@Test
public void testFlows() throws Exception {
// prepare the payload
byte[] payload = archive(ProcessIT.class.getResource("configurableFlowsDirectory").toURI());
// start the process
ProcessApi processApi = new ProcessApi(getApiClient());
StartProcessResponse spr = start(payload);
assertNotNull(spr.getInstanceId());
// wait for completion
ProcessEntry pir = waitForCompletion(processApi, spr.getInstanceId());
// get the name of the agent's log file
assertNotNull(pir.getLogFileName());
// check the logs
byte[] ab = getLog(pir.getLogFileName());
assertLog(".*External flow!.*", ab);
}
Aggregations