use of org.neo4j.doc.server.helpers.FunctionalTestHelper in project neo4j-documentation by neo4j.
the class HTTPLoggingDocIT method givenExplicitlyDisabledServerLoggingConfigurationShouldNotLogAccesses.
@Test
public void givenExplicitlyDisabledServerLoggingConfigurationShouldNotLogAccesses() throws Exception {
// given
String directoryPrefix = testName.getMethodName();
File logDirectory = testDirectory.directory(directoryPrefix + "-logdir");
FileUtils.forceMkdir(logDirectory);
final File confDir = testDirectory.directory(directoryPrefix + "-confdir");
FileUtils.forceMkdir(confDir);
NeoServer server = CommunityServerBuilder.server().withDefaultDatabaseTuning().withProperty(ServerSettings.http_logging_enabled.name(), "false").withProperty(GraphDatabaseSettings.logs_directory.name(), logDirectory.toString()).usingDataDir(testDirectory.directory(directoryPrefix + "-dbdir").getAbsolutePath()).build();
try {
server.start();
FunctionalTestHelper functionalTestHelper = new FunctionalTestHelper(server);
// when
String query = "?implicitlyDisabled" + randomString();
JaxRsResponse response = new RestRequest().get(functionalTestHelper.managementUri() + query);
assertThat(response.getStatus(), is(200));
response.close();
// then
File httpLog = new File(logDirectory, "http.log");
assertThat(httpLog.exists(), is(false));
} finally {
server.stop();
}
}
use of org.neo4j.doc.server.helpers.FunctionalTestHelper in project neo4j-documentation by neo4j.
the class RemoveNodePropertiesDocIT method setupServer.
@BeforeClass
public static void setupServer() throws IOException {
functionalTestHelper = new FunctionalTestHelper(server());
helper = functionalTestHelper.getGraphDbHelper();
}
use of org.neo4j.doc.server.helpers.FunctionalTestHelper in project neo4j-documentation by neo4j.
the class RemoveRelationshipDocIT method setupServer.
@BeforeClass
public static void setupServer() throws IOException {
functionalTestHelper = new FunctionalTestHelper(server());
helper = functionalTestHelper.getGraphDbHelper();
}
Aggregations