use of org.neo4j.graphdb.config.Setting in project neo4j by neo4j.
the class HttpConnectorValidatorTest method setsDeprecationFlagOnType.
@Test
public void setsDeprecationFlagOnType() throws Exception {
Setting setting = cv.getSettingFor("dbms.connector.http.type", Collections.emptyMap()).orElseThrow(() -> new RuntimeException("missing setting!"));
assertTrue(setting.deprecated());
assertEquals(Optional.empty(), setting.replacement());
}
use of org.neo4j.graphdb.config.Setting in project neo4j by neo4j.
the class HttpConnectorValidatorTest method setsDeprecationFlagOnCustomNamedHttpsConnectors.
@Test
public void setsDeprecationFlagOnCustomNamedHttpsConnectors() throws Exception {
List<Setting<Object>> settings = cv.settings(stringMap("dbms.connector.0.type", "HTTP", "dbms.connector.0.enabled", "false", "dbms.connector.0.listen_address", "1.2.3.4:123", "dbms.connector.0.advertised_address", "localhost:123", "dbms.connector.0.encryption", Encryption.TLS.toString()));
assertEquals(5, settings.size());
for (Setting s : settings) {
assertTrue("every setting should be deprecated: " + s.name(), s.deprecated());
String[] parts = s.name().split("\\.");
if (!"encryption".equals(parts[3]) && !"type".equals(parts[3])) {
assertEquals(Optional.of(format("%s.%s.%s.%s", parts[0], parts[1], "https", parts[3])), s.replacement());
}
}
}
use of org.neo4j.graphdb.config.Setting in project neo4j by neo4j.
the class HttpConnectorValidatorTest method setsDeprecationFlagOnAddress.
@Test
public void setsDeprecationFlagOnAddress() throws Exception {
Setting setting = cv.getSettingFor("dbms.connector.http.address", Collections.emptyMap()).orElseThrow(() -> new RuntimeException("missing setting!"));
assertTrue(setting.deprecated());
assertEquals(Optional.of("dbms.connector.http.listen_address"), setting.replacement());
}
use of org.neo4j.graphdb.config.Setting in project neo4j by neo4j.
the class TestGraphDatabaseFactory method newImpermanentDatabase.
public GraphDatabaseService newImpermanentDatabase(Map<Setting<?>, String> config) {
GraphDatabaseBuilder builder = newImpermanentDatabaseBuilder();
for (Map.Entry<Setting<?>, String> entry : config.entrySet()) {
Setting<?> key = entry.getKey();
String value = entry.getValue();
builder.setConfig(key, value);
}
return builder.newGraphDatabase();
}
use of org.neo4j.graphdb.config.Setting in project neo4j by neo4j.
the class AuthProceduresIT method createGraphDatabase.
//---------- utility -----------
private GraphDatabaseService createGraphDatabase(EphemeralFileSystemAbstraction fs) throws IOException {
removePreviousAuthFile();
Map<Setting<?>, String> settings = new HashMap<>();
settings.put(GraphDatabaseSettings.auth_enabled, "true");
TestGraphDatabaseBuilder graphDatabaseFactory = (TestGraphDatabaseBuilder) new TestGraphDatabaseFactory().setFileSystem(fs).newImpermanentDatabaseBuilder().setConfig(GraphDatabaseSettings.auth_enabled, "true");
return graphDatabaseFactory.newGraphDatabase();
}
Aggregations