use of com.walmartlabs.concord.client.StartProcessResponse in project concord by walmartlabs.
the class DockerIT method testLogWithoutStdOut.
@Test
public void testLogWithoutStdOut() throws Exception {
byte[] payload = archive(DockerIT.class.getResource("dockerLogWithoutStdOut").toURI());
Map<String, Object> input = new HashMap<>();
input.put("archive", payload);
input.put("arguments.image", ITConstants.DOCKER_ANSIBLE_IMAGE);
StartProcessResponse spr = start(input);
ProcessApi processApi = new ProcessApi(getApiClient());
ProcessEntry pir = waitForCompletion(processApi, spr.getInstanceId());
assertNotNull(pir.getLogFileName());
byte[] ab = getLog(pir.getLogFileName());
assertLog(".*DOCKER: Hello, world.*", ab);
assertLog(".*DOCKER: STDERR WORKS.*", ab);
}
use of com.walmartlabs.concord.client.StartProcessResponse in project concord by walmartlabs.
the class DockerIT method test.
@Test
public void test() throws Exception {
byte[] payload = archive(DockerIT.class.getResource("docker").toURI());
Map<String, Object> input = new HashMap<>();
input.put("archive", payload);
input.put("arguments.image", ITConstants.DOCKER_ANSIBLE_IMAGE);
StartProcessResponse spr = start(input);
ProcessApi processApi = new ProcessApi(getApiClient());
ProcessEntry pir = waitForCompletion(processApi, spr.getInstanceId());
assertNotNull(pir.getLogFileName());
byte[] ab = getLog(pir.getLogFileName());
assertLog(".*DOCKER: Hello, world.*", ab);
}
use of com.walmartlabs.concord.client.StartProcessResponse in project concord by walmartlabs.
the class DockerIT method testLogWithStdErr.
@Test
public void testLogWithStdErr() throws Exception {
byte[] payload = archive(DockerIT.class.getResource("dockerLogWithStdErr").toURI());
Map<String, Object> input = new HashMap<>();
input.put("archive", payload);
input.put("arguments.image", ITConstants.DOCKER_ANSIBLE_IMAGE);
StartProcessResponse spr = start(input);
ProcessApi processApi = new ProcessApi(getApiClient());
ProcessEntry pir = waitForCompletion(processApi, spr.getInstanceId());
assertNotNull(pir.getLogFileName());
byte[] ab = getLog(pir.getLogFileName());
assertLog(".*STDERR: STDERR WORKS.*", ab);
}
use of com.walmartlabs.concord.client.StartProcessResponse in project concord by walmartlabs.
the class DockerIT method testPullRetry.
@Test
public void testPullRetry() throws Exception {
byte[] payload = archive(DockerIT.class.getResource("dockerPullRetry").toURI());
StartProcessResponse spr = start(payload);
ProcessApi processApi = new ProcessApi(getApiClient());
ProcessEntry pir = waitForCompletion(processApi, spr.getInstanceId());
byte[] ab = getLog(pir.getLogFileName());
assertLogAtLeast(".*Error pulling the image.*", 2, ab);
}
use of com.walmartlabs.concord.client.StartProcessResponse in project concord by walmartlabs.
the class ClasspathIsolationIT method testBrokenDeps.
@Test
public void testBrokenDeps() throws Exception {
byte[] payload = archive(ClasspathIsolationIT.class.getResource("brokenDeps").toURI());
Map<String, Object> input = new HashMap<>();
input.put("archive", payload);
Map<String, Object> cfg = new HashMap<>();
cfg.put("dependencies", new String[] { "mvn://com.walmartlabs.concord.it.tasks:broken-deps:" + ITConstants.PROJECT_VERSION });
input.put("request", cfg);
StartProcessResponse spr = start(input);
ProcessApi processApi = new ProcessApi(getApiClient());
ProcessEntry pir = waitForCompletion(processApi, spr.getInstanceId());
byte[] ab = getLog(pir.getLogFileName());
assertLog(".*hello!.*", ab);
}
Aggregations