use of org.neo4j.server.helpers.FunctionalTestHelper in project neo4j by neo4j.
the class NeoServerDefaultPortAndHostnameIT method shouldDefaultToSensiblePortIfNoneSpecifiedInConfig.
@Test
public void shouldDefaultToSensiblePortIfNoneSpecifiedInConfig() throws Exception {
FunctionalTestHelper functionalTestHelper = new FunctionalTestHelper(server());
JaxRsResponse response = functionalTestHelper.get(functionalTestHelper.managementUri());
assertThat(response.getStatus(), is(200));
}
use of org.neo4j.server.helpers.FunctionalTestHelper in project neo4j by neo4j.
the class NeoServerJAXRSIT method shouldMakeJAXRSClassesAvailableViaHTTP.
@Test
public void shouldMakeJAXRSClassesAvailableViaHTTP() throws Exception {
CommunityServerBuilder builder = CommunityServerBuilder.server();
server = ServerHelper.createNonPersistentServer(builder);
FunctionalTestHelper functionalTestHelper = new FunctionalTestHelper(server);
JaxRsResponse response = new RestRequest().get(functionalTestHelper.managementUri());
assertEquals(200, response.getStatus());
response.close();
}
use of org.neo4j.server.helpers.FunctionalTestHelper in project neo4j by neo4j.
the class CloneSubgraphPluginTest method setupServer.
@BeforeClass
public static void setupServer() throws IOException {
server = ServerHelper.createNonPersistentServer();
functionalTestHelper = new FunctionalTestHelper(server);
}
use of org.neo4j.server.helpers.FunctionalTestHelper in project neo4j by neo4j.
the class HTTPLoggingIT method givenExplicitlyDisabledServerLoggingConfigurationShouldNotLogAccesses.
@Test
public void givenExplicitlyDisabledServerLoggingConfigurationShouldNotLogAccesses() throws Exception {
// given
String directoryPrefix = testName.getMethodName();
File logDirectory = testDirectory.directory(directoryPrefix + "-logdir");
NeoServer server = CommunityServerBuilder.server().withDefaultDatabaseTuning().persistent().withProperty(ServerSettings.http_logging_enabled.name(), Settings.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(HttpStatus.SC_OK));
response.close();
// then
File httpLog = new File(logDirectory, "http.log");
assertThat(httpLog.exists(), is(false));
} finally {
server.stop();
}
}
use of org.neo4j.server.helpers.FunctionalTestHelper in project neo4j by neo4j.
the class StandaloneHaInfoFunctionalTest method testHaDiscoveryOnStandaloneReturns403.
@Test
public void testHaDiscoveryOnStandaloneReturns403() throws Exception {
FunctionalTestHelper helper = new FunctionalTestHelper(server);
JaxRsResponse response = RestRequest.req().get(getBasePath(helper));
assertEquals(SC_FORBIDDEN, response.getStatus());
}
Aggregations