Created AuthenticationService-specific config for audit tests

- Makes for a clearer demonstration of API-based auditing


git-svn-id: https://svn.alfresco.com/repos/alfresco-enterprise/alfresco/HEAD/root@17693 c4b6b30b-aa2e-2d43-bbcb-ca4b014f7261
This commit is contained in:
Derek Hulley
2009-12-01 15:41:49 +00:00
parent 4835819b62
commit 48df5a03ac
4 changed files with 41 additions and 27 deletions

View File

@@ -72,7 +72,7 @@ public class AuditComponentTest extends TestCase
{
private static final String APPLICATION_TEST = "Alfresco Test";
private static final String APPLICATION_ACTIONS_TEST = "Actions Test";
private static final String APPLICATION_API_TEST = "API Test";
private static final String APPLICATION_API_TEST = "Test AuthenticationService";
private static final Log logger = LogFactory.getLog(AuditComponentTest.class);
@@ -454,12 +454,10 @@ public class AuditComponentTest extends TestCase
public void testAuditAuthenticationService() throws Exception
{
final Map<String, Serializable> expected = new HashMap<String, Serializable>();
expected.put("/actions-test/actions/user", AuthenticationUtil.getFullyAuthenticatedUser());
expected.put("/actions-test/actions/context-node/noderef", nodeRef);
expected.put("/actions-test/actions/action-01/params/A/value", null);
expected.put("/actions-test/actions/action-01/params/B/value", null);
expected.put("/actions-test/actions/action-01/params/C/value", null);
// Load in the config for this specific test: alfresco-audit-test-authenticationservice.xml
URL testModelUrl = ResourceUtils.getURL("classpath:alfresco/audit/alfresco-audit-test-authenticationservice.xml");
auditModelRegistry.registerModel(testModelUrl);
auditModelRegistry.loadAuditModels();
final List<Map<String, Serializable>> results = new ArrayList<Map<String,Serializable>>();
final StringBuilder sb = new StringBuilder();