fix test cases
This commit is contained in:
parent
ce4ddda567
commit
e32116e668
2 changed files with 10 additions and 4 deletions
|
@ -200,15 +200,21 @@ public abstract class CrudTestBase extends ITBase {
|
|||
// Utilities
|
||||
// ================
|
||||
protected Response checkGetMethod(final Map<String, Object> body, final String path) {
|
||||
return checkMethodBase(body).get(getApiPath() + "/" + path);
|
||||
Response response = checkMethodBase(body).get(getApiPath() + "/" + path);
|
||||
// logger.debug(response.asString());
|
||||
return response;
|
||||
}
|
||||
|
||||
protected Response checkPutMethod(final Map<String, Object> body, final String path) {
|
||||
return checkMethodBase(body).put(getApiPath() + "/" + path);
|
||||
Response response = checkMethodBase(body).put(getApiPath() + "/" + path);
|
||||
// logger.debug(response.asString());
|
||||
return response;
|
||||
}
|
||||
|
||||
protected Response checkPostMethod(final Map<String, Object> body, final String path) {
|
||||
return checkMethodBase(body).post(getApiPath() + "/" + path);
|
||||
Response response = checkMethodBase(body).post(getApiPath() + "/" + path);
|
||||
// logger.debug(response.asString());
|
||||
return response;
|
||||
}
|
||||
|
||||
protected Response checkDeleteMethod(final String path) {
|
||||
|
|
|
@ -41,7 +41,7 @@ public class ITBase {
|
|||
given().contentType("application/json")
|
||||
.body("{\"index\":{\"_index\":\".fess_config.access_token\",\"_type\":\"access_token\",\"_id\":\""
|
||||
+ DEFAULT_TEST_TOKEN_ID
|
||||
+ "\"}}\n{\"updatedTime\":1490250145200,\"updatedBy\":\"admin\",\"createdBy\":\"admin\",\"permissions\":[\"Radmin-api\",\\\"Rguest\\\"],\"name\":\"Admin API\",\"createdTime\":1490250145200,\"token\":\""
|
||||
+ "\"}}\n{\"updatedTime\":1490250145200,\"updatedBy\":\"admin\",\"createdBy\":\"admin\",\"permissions\":[\"Radmin-api\",\"Rguest\"],\"name\":\"Admin API\",\"createdTime\":1490250145200,\"token\":\""
|
||||
+ DEFAULT_TEST_TOKEN + "\"}\n").when().post(getEsUrl() + "/_bulk");
|
||||
given().contentType("application/json").when().post(getEsUrl() + "/_refresh");
|
||||
return DEFAULT_TEST_TOKEN;
|
||||
|
|
Loading…
Add table
Reference in a new issue