use of org.neo4j.server.helpers.FunctionalTestHelper in project neo4j by neo4j.
the class ManageNodeIT method setupServer.
@BeforeClass
public static void setupServer() throws IOException {
functionalTestHelper = new FunctionalTestHelper(server());
helper = functionalTestHelper.getGraphDbHelper();
}
use of org.neo4j.server.helpers.FunctionalTestHelper in project neo4j by neo4j.
the class PagedTraverserIT method setupServer.
@BeforeClass
public static void setupServer() throws Exception {
clock = Clocks.fakeClock();
server = CommunityServerBuilder.server().usingDataDir(staticFolder.getRoot().getAbsolutePath()).withClock(clock).build();
suppressAll().call((Callable<Void>) () -> {
server.start();
return null;
});
functionalTestHelper = new FunctionalTestHelper(server);
}
use of org.neo4j.server.helpers.FunctionalTestHelper in project neo4j by neo4j.
the class RetrieveRelationshipsFromNodeIT method setupServer.
@BeforeClass
public static void setupServer() throws IOException {
functionalTestHelper = new FunctionalTestHelper(server());
helper = functionalTestHelper.getGraphDbHelper();
}
use of org.neo4j.server.helpers.FunctionalTestHelper in project neo4j by neo4j.
the class SecurityRulesIT method should403WhenAuthenticatedButForbidden.
@Test
public void should403WhenAuthenticatedButForbidden() throws Exception {
server = CommunityServerBuilder.server().withDefaultDatabaseTuning().withSecurityRules(PermanentlyForbiddenSecurityRule.class.getCanonicalName(), PermanentlyPassingSecurityRule.class.getCanonicalName()).usingDataDir(folder.directory(name.getMethodName()).getAbsolutePath()).build();
server.start();
functionalTestHelper = new FunctionalTestHelper(server);
JaxRsResponse clientResponse = gen.get().expectedStatus(403).expectedType(MediaType.APPLICATION_JSON_TYPE).get(trimTrailingSlash(functionalTestHelper.baseUri())).response();
assertEquals(403, clientResponse.getStatus());
}
use of org.neo4j.server.helpers.FunctionalTestHelper in project neo4j by neo4j.
the class SecurityRulesIT method shouldRespondWith201IfAllTheRulesPassWhenCreatingANode.
@Test
public void shouldRespondWith201IfAllTheRulesPassWhenCreatingANode() throws Exception {
server = CommunityServerBuilder.server().withDefaultDatabaseTuning().withSecurityRules(PermanentlyPassingSecurityRule.class.getCanonicalName()).usingDataDir(folder.directory(name.getMethodName()).getAbsolutePath()).build();
server.start();
functionalTestHelper = new FunctionalTestHelper(server);
gen.get().expectedStatus(201).expectedHeader("Location").post(functionalTestHelper.nodeUri()).response();
}
Aggregations