use of com.walmartlabs.concord.client.ProcessApi in project concord by walmartlabs.
the class DockerIT method testTaskSyntaxOut.
@Test
public void testTaskSyntaxOut() throws Exception {
byte[] payload = archive(DockerIT.class.getResource("dockerTaskSyntaxOut").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(".*!! Hello, world.*", ab);
assertLog(".*DOCKER: STDERR STILL WORKS.*", ab);
}
use of com.walmartlabs.concord.client.ProcessApi 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.ProcessApi 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.ProcessApi 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.ProcessApi 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);
}
Aggregations