Merged 5.2.N-AUDIT-API (5.2.2) to 5.2.N (5.2.2)

137927 eknizat: REPO-1298 Enable/Disable Application Auditing - Changes following code review


git-svn-id: https://svn.alfresco.com/repos/alfresco-enterprise/alfresco/BRANCHES/DEV/5.2.N/root@137972 c4b6b30b-aa2e-2d43-bbcb-ca4b014f7261
This commit is contained in:
Jan Vonka
2017-07-12 12:11:02 +00:00
parent 131985f84d
commit 97299a3616
3 changed files with 7 additions and 7 deletions

View File

@@ -249,9 +249,10 @@ public class AuditAppTest extends AbstractSingleNetworkSiteTest
setRequestContext(networkOne.getId(), networkAdmin, DEFAULT_ADMIN_PWD);
//Get one of the audit app ids (default tagging)
//Get one of the audit app ids ( fail test if there are no audit apps in the system )
ListResponse<AuditApp> apps = publicApiClient.auditApps().getAuditApps(null, "Getting audit apps error ", HttpServletResponse.SC_OK);
appId = (apps.getList().size()>0) ? apps.getList().get(0).getId() : "tagging";
if (apps.getList().size() == 0) fail("There are no audit applications to run this test against.");
appId = apps.getList().get(0).getId();
// +ve
// Disable audit app
@@ -281,7 +282,7 @@ public class AuditAppTest extends AbstractSingleNetworkSiteTest
// 501
AuthenticationUtil.setFullyAuthenticatedUser(networkAdmin);
disableSystemAudit();
responseAuditApp = publicApiClient.auditApps().updateAuditApp(appId,requestAuditApp,null, HttpServletResponse.SC_NOT_IMPLEMENTED);
publicApiClient.auditApps().updateAuditApp(appId,requestAuditApp,null, HttpServletResponse.SC_NOT_IMPLEMENTED);
enableSystemAudit();
}

View File

@@ -2480,7 +2480,7 @@ public class PublicApiClient
public AuditApp updateAuditApp(String applicationId, AuditApp auditApp, Map<String, String> params, int expectedStatus) throws PublicApiException
{
HttpResponse response = update("audit-applications", applicationId,null,null, auditApp.toJSON().toString(), params, "Eriks test failed", expectedStatus);
HttpResponse response = update("audit-applications", applicationId,null,null, auditApp.toJSON().toString(), params, "Failed to update Audit Application", expectedStatus);
if (response != null && response.getJsonResponse() != null)
{
@@ -2490,7 +2490,6 @@ public class PublicApiClient
return AuditApp.parseAuditApp(jsonEntry);
}
}
return null;
}