mirror of
https://github.com/Alfresco/alfresco-community-repo.git
synced 2025-08-07 17:49:17 +00:00
Fixed unit test: Forgot that auditing is not enabled by default in repo anymore
git-svn-id: https://svn.alfresco.com/repos/alfresco-enterprise/alfresco/HEAD/root@16505 c4b6b30b-aa2e-2d43-bbcb-ca4b014f7261
This commit is contained in:
@@ -79,6 +79,7 @@ public class AuditComponentTest extends TestCase
|
||||
|
||||
private AuditModelRegistry auditModelRegistry;
|
||||
private AuditComponent auditComponent;
|
||||
private AuditMethodInterceptor auditMethodInterceptor;
|
||||
private AuditService auditService;
|
||||
private ServiceRegistry serviceRegistry;
|
||||
private TransactionService transactionService;
|
||||
@@ -92,6 +93,7 @@ public class AuditComponentTest extends TestCase
|
||||
{
|
||||
auditModelRegistry = (AuditModelRegistry) ctx.getBean("auditModel.modelRegistry");
|
||||
auditComponent = (AuditComponent) ctx.getBean("auditComponent");
|
||||
auditMethodInterceptor = (AuditMethodInterceptor) ctx.getBean("AuditMethodInterceptor");
|
||||
serviceRegistry = (ServiceRegistry) ctx.getBean(ServiceRegistry.SERVICE_REGISTRY);
|
||||
auditService = serviceRegistry.getAuditService();
|
||||
transactionService = serviceRegistry.getTransactionService();
|
||||
@@ -125,12 +127,17 @@ public class AuditComponentTest extends TestCase
|
||||
}
|
||||
};
|
||||
transactionService.getRetryingTransactionHelper().doInTransaction(resetDisabledPathsCallback);
|
||||
|
||||
auditMethodInterceptor.setEnabled(true);
|
||||
auditMethodInterceptor.setUseNewConfig(true);
|
||||
}
|
||||
|
||||
@Override
|
||||
public void tearDown() throws Exception
|
||||
{
|
||||
AuthenticationUtil.clearCurrentSecurityContext();
|
||||
auditMethodInterceptor.setEnabled(false);
|
||||
auditMethodInterceptor.setUseNewConfig(false);
|
||||
}
|
||||
|
||||
public void testSetUp()
|
||||
@@ -459,12 +466,12 @@ public class AuditComponentTest extends TestCase
|
||||
long time,
|
||||
Map<String, Serializable> values)
|
||||
{
|
||||
results.add(values);
|
||||
if (logger.isDebugEnabled())
|
||||
{
|
||||
logger.debug(
|
||||
"Audit Entry: " + applicationName + ", " + user + ", " + new Date(time) + "\n" +
|
||||
" Data: " + values);
|
||||
results.add(values);
|
||||
}
|
||||
sb.append("Row: ")
|
||||
.append(entryId).append(" | ")
|
||||
|
@@ -106,9 +106,7 @@
|
||||
</AuditPath>
|
||||
</AuditPath>
|
||||
<AuditPath key="error">
|
||||
<AuditPath key="userName">
|
||||
<RecordValue key="value" dataExtractor="simpleValue"/>
|
||||
</AuditPath>
|
||||
<RecordValue key="value" dataExtractor="simpleValue"/>
|
||||
</AuditPath>
|
||||
</AuditPath>
|
||||
</AuditPath>
|
||||
|
Reference in New Issue
Block a user