use of org.folio.okapi.MainDeploy in project okapi by folio-org.
the class MainDeployTest method testHelp.
@Test
public void testHelp(TestContext context) {
async = context.async();
String[] args = { "help" };
MainDeploy d = new MainDeploy();
d.init(args, res -> {
vertx = res.succeeded() ? res.result() : null;
Assert.assertTrue(res.succeeded());
async.complete();
});
}
use of org.folio.okapi.MainDeploy in project okapi by folio-org.
the class MainDeployTest method testProxyMode.
@Test
public void testProxyMode(TestContext context) {
async = context.async();
String[] args = { "proxy" };
MainDeploy d = new MainDeploy();
d.init(args, res -> {
vertx = res.succeeded() ? res.result() : null;
Assert.assertTrue("main1 " + res.cause(), res.succeeded());
RestAssuredClient c;
Response r;
c = api.createRestAssured3();
r = c.given().get("/_/proxy/modules").then().statusCode(200).log().ifValidationFails().extract().response();
Assert.assertTrue("raml: " + c.getLastReport().toString(), c.getLastReport().isEmpty());
async.complete();
});
}
use of org.folio.okapi.MainDeploy in project okapi by folio-org.
the class MainDeployTest method testNoArgs.
@Test
public void testNoArgs(TestContext context) {
async = context.async();
String[] args = {};
MainDeploy d = new MainDeploy();
d.init(args, res -> {
Assert.assertFalse(res.succeeded());
vertx = res.succeeded() ? res.result() : null;
async.complete();
});
}
use of org.folio.okapi.MainDeploy in project okapi by folio-org.
the class MainDeployTest method testDeploymentMode.
@Test
public void testDeploymentMode(TestContext context) {
async = context.async();
String[] args = { "deployment" };
MainDeploy d = new MainDeploy();
d.init(args, res -> {
vertx = res.succeeded() ? res.result() : null;
Assert.assertTrue("main1" + res.cause(), res.succeeded());
RestAssuredClient c;
Response r;
c = api.createRestAssured3();
r = c.given().get("/_/deployment/modules").then().statusCode(200).log().ifValidationFails().extract().response();
Assert.assertTrue("raml: " + c.getLastReport().toString(), c.getLastReport().isEmpty());
async.complete();
});
}
use of org.folio.okapi.MainDeploy in project okapi by folio-org.
the class MainDeployTest method testClusterModeFail3.
@Test
public void testClusterModeFail3(TestContext context) {
async = context.async();
String[] args = { "cluster", "-hazelcast-config-cp", "foobar" };
MainDeploy d = new MainDeploy();
d.init(args, res -> {
vertx = res.succeeded() ? res.result() : null;
Assert.assertTrue("main1 " + res.cause(), res.failed());
async.complete();
});
}
Aggregations