mirror of
https://github.com/sismics/docs.git
synced 2025-12-16 19:21:48 +00:00
Document count in GET /app, TODO
This commit is contained in:
@@ -26,8 +26,13 @@ public class TestAppResource extends BaseJerseyTest {
|
||||
*/
|
||||
@Test
|
||||
public void testAppResource() throws JSONException {
|
||||
// Login app1
|
||||
clientUtil.createUser("app1");
|
||||
String app1Token = clientUtil.login("app1");
|
||||
|
||||
// Check the application info
|
||||
WebResource appResource = resource().path("/app");
|
||||
appResource.addFilter(new CookieAuthenticationFilter(app1Token));
|
||||
ClientResponse response = appResource.get(ClientResponse.class);
|
||||
response = appResource.get(ClientResponse.class);
|
||||
Assert.assertEquals(Status.OK, Status.fromStatusCode(response.getStatus()));
|
||||
@@ -40,6 +45,7 @@ public class TestAppResource extends BaseJerseyTest {
|
||||
Assert.assertTrue(freeMemory > 0);
|
||||
Long totalMemory = json.getLong("total_memory");
|
||||
Assert.assertTrue(totalMemory > 0 && totalMemory > freeMemory);
|
||||
Assert.assertEquals(0, json.getInt("document_count"));
|
||||
}
|
||||
|
||||
/**
|
||||
|
||||
Reference in New Issue
Block a user