use of org.icij.datashare.session.LocalUserFilter in project datashare by ICIJ.
the class IndexResourceTest method test_no_auth_get_forward_request_to_elastic.
@Test
public void test_no_auth_get_forward_request_to_elastic() {
configure(routes -> routes.add(new IndexResource(indexer)).filter(new LocalUserFilter(new PropertiesProvider(new HashMap<String, String>() {
{
put("defaultUserName", "test");
}
}))));
get("/api/index/search/test-datashare/_search").should().respond(200).contain("\"successful\":1");
}
use of org.icij.datashare.session.LocalUserFilter in project datashare by ICIJ.
the class ProjectResourceTest method setUp.
@Before
public void setUp() {
initMocks(this);
configure(routes -> routes.add(new ProjectResource(repository, indexer)).filter(new LocalUserFilter(new PropertiesProvider())));
}
Aggregations