mirror of
https://github.com/Alfresco/alfresco-community-repo.git
synced 2025-08-14 17:58:59 +00:00
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:
@@ -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();
|
||||
}
|
||||
|
||||
|
@@ -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;
|
||||
}
|
||||
|
||||
|
Reference in New Issue
Block a user