use of org.folio.okapi.MainDeploy in project okapi by folio-org.
the class MainDeployTest method testClusterModeFail2.
@Test
public void testClusterModeFail2(TestContext context) {
async = context.async();
String[] args = { "cluster", "-hazelcast-config-file", "foobar" };
MainDeploy d = new MainDeploy();
d.init(args, res -> {
vertx = res.succeeded() ? res.result() : null;
Assert.assertTrue("main1 " + res.cause(), res.failed());
async.complete();
});
}
use of org.folio.okapi.MainDeploy in project okapi by folio-org.
the class MainDeployTest method testClusterMode.
@Test
public void testClusterMode(TestContext context) {
async = context.async();
String[] args = { "cluster" };
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 testBadMode.
@Test
public void testBadMode(TestContext context) {
async = context.async();
String[] args = { "bad" };
MainDeploy d = new MainDeploy();
d.init(args, res -> {
vertx = res.succeeded() ? res.result() : null;
Assert.assertFalse(res.succeeded());
async.complete();
});
}
use of org.folio.okapi.MainDeploy in project okapi by folio-org.
the class MainDeployTest method testBadOption.
@Test
public void testBadOption(TestContext context) {
async = context.async();
String[] args = { "-bad-option" };
MainDeploy d = new MainDeploy();
d.init(args, res -> {
vertx = res.succeeded() ? res.result() : null;
Assert.assertFalse(res.succeeded());
async.complete();
});
}
use of org.folio.okapi.MainDeploy in project okapi by folio-org.
the class MainDeployTest method testDevMode.
@Test
public void testDevMode(TestContext context) {
async = context.async();
String[] args = { "dev" };
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("/_/version").then().statusCode(200).log().ifValidationFails().extract().response();
Assert.assertTrue("raml: " + c.getLastReport().toString(), c.getLastReport().isEmpty());
async.complete();
});
}
Aggregations