Search in sources :

Example 11 with CoreConfigParser

use of com.vaticle.typedb.core.server.parameters.CoreConfigParser in project grakn by graknlabs.

the class CoreConfigTest method config_file_missing_debugger_throws.

@Test
public void config_file_missing_debugger_throws() {
    Path configMissingLogDebugger = Util.getTypedbDir().resolve("server/test/config/config-missing-debugger.yml");
    try {
        CoreConfigFactory.config(configMissingLogDebugger, new HashSet<>(), new CoreConfigParser());
        fail();
    } catch (TypeDBException e) {
        assert e.code().isPresent();
        assertEquals(MISSING_CONFIG_OPTION.code(), e.code().get());
        assertEquals(MISSING_CONFIG_OPTION.message("log.debugger"), e.getMessage());
    }
}
Also used : Path(java.nio.file.Path) TypeDBException(com.vaticle.typedb.core.common.exception.TypeDBException) CoreConfigParser(com.vaticle.typedb.core.server.parameters.CoreConfigParser) Test(org.junit.Test)

Aggregations

CoreConfigParser (com.vaticle.typedb.core.server.parameters.CoreConfigParser)11 Test (org.junit.Test)10 TypeDBException (com.vaticle.typedb.core.common.exception.TypeDBException)7 Path (java.nio.file.Path)7 CoreConfig (com.vaticle.typedb.core.server.parameters.CoreConfig)4 InetSocketAddress (java.net.InetSocketAddress)3 Option (com.vaticle.typedb.core.server.parameters.util.Option)2 ServerSubcommand (com.vaticle.typedb.core.server.parameters.ServerSubcommand)1 ServerSubcommandParser (com.vaticle.typedb.core.server.parameters.ServerSubcommandParser)1 IOException (java.io.IOException)1 BindException (java.net.BindException)1