use of com.walmartlabs.concord.client.ProjectEntry in project concord by walmartlabs.
the class RawPayloadProjectIT method testReject.
@Test
public void testReject() throws Exception {
ProjectsApi projectsApi = new ProjectsApi(getApiClient());
String orgName = "Default";
String projectName = "project_" + System.currentTimeMillis();
projectsApi.createOrUpdate(orgName, new ProjectEntry().setName(projectName));
// ---
byte[] payload = archive(ProcessIT.class.getResource("example").toURI());
try {
Map<String, Object> input = new HashMap<>();
input.put("org", orgName);
input.put("project", projectName);
input.put("archive", payload);
StartProcessResponse process = start(input);
System.out.println("process: " + process);
fail("should fail");
} catch (ApiException e) {
}
}
use of com.walmartlabs.concord.client.ProjectEntry in project concord by walmartlabs.
the class ValidationIT method testProjectCreation.
@Test
public void testProjectCreation() throws Exception {
ProjectsApi projectsApi = new ProjectsApi(getApiClient());
try {
ProjectEntry req = new ProjectEntry().setName("@123_123");
projectsApi.createOrUpdate("Default", req);
fail("Should fail with a validation error");
} catch (ApiException e) {
assertInvalidRequest(e);
}
ProjectEntry req = new ProjectEntry().setName("aProperName@" + System.currentTimeMillis());
projectsApi.createOrUpdate("Default", req);
}
use of com.walmartlabs.concord.client.ProjectEntry in project concord by walmartlabs.
the class OutVariablesProjectIT method testReject.
@Test
public void testReject() throws Exception {
ProjectsApi projectsApi = new ProjectsApi(getApiClient());
String orgName = "Default";
String projectName = "project_" + System.currentTimeMillis();
projectsApi.createOrUpdate(orgName, new ProjectEntry().setName(projectName));
// ---
byte[] payload = archive(ProcessIT.class.getResource("example").toURI());
try {
Map<String, Object> input = new HashMap<>();
input.put("org", orgName);
input.put("project", projectName);
input.put("archive", payload);
input.put("out", "x,y,z");
start(input);
fail("should fail");
} catch (ApiException e) {
}
}
Aggregations