use of com.walmartlabs.concord.client.StartProcessResponse 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.StartProcessResponse 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.StartProcessResponse 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.StartProcessResponse 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);
}
use of com.walmartlabs.concord.client.StartProcessResponse in project concord by walmartlabs.
the class DynamicTaskIT method testDynamicTask.
@Test
public void testDynamicTask() throws Exception {
// prepare the payload
byte[] payload = archive(DynamicTaskIT.class.getResource("dynamicTask").toURI(), ITConstants.DEPENDENCIES_DIR);
// start the process
ProcessApi processApi = new ProcessApi(getApiClient());
StartProcessResponse spr = start(payload);
assertNotNull(spr.getInstanceId());
// ---
ProcessEntry pir = waitForCompletion(processApi, spr.getInstanceId());
// ---
byte[] ab = getLog(pir.getLogFileName());
assertLog(".*Hey, world.*", ab);
}
Aggregations