[MGNLMIGRATION-322] Improve comparison of users/userGroups/userRoles workspace Created: 24/Feb/14 Updated: 09/May/14 Resolved: 09/May/14 |
|
| Status: | Closed |
| Project: | Migration 4.4 to 4.5 (closed) |
| Component/s: | None |
| Affects Version/s: | None |
| Fix Version/s: | 1.2.10 |
| Type: | Improvement | Priority: | Major |
| Reporter: | Roman Kovařík | Assignee: | Robert Šiška |
| Resolution: | Fixed | Votes: | 0 |
| Labels: | maintenance | ||
| Remaining Estimate: | Not Specified | ||
| Time Spent: | Not Specified | ||
| Original Estimate: | Not Specified | ||
| Issue Links: |
|
||||||||
| Template: |
|
||||||||
| Acceptance criteria: |
Empty
|
||||||||
| Date of First Response: | |||||||||
| Description |
|
info.magnolia.module.migrationtests.CompareConfigsTest.testCompareUsersWorkspace() currently has a lot of ignores specified: public void testCompareUsersWorkspace() throws Exception { assertTrue(compare("/", RepositoryConstants.USERS, new String[] { "/system/superuser/lastaccess", "/system/superuser/pswd", "/system/anonymous/pswd", })); } Although ignoring of password and lastaccess properties is not so bad, bigger problem is with ids of roles which could be added in different order on fresh/updated instance:
Implement comparison which handle such cases (parse out the report if no better idea). Please move such tests out of CompareConfigsTest to something like Compare*Workspace if it would require new implementation. |
| Comments |
| Comment by Milan Divilek [ 27/Mar/14 ] |
|
Reopen: Seems that "deepcompare" doesn't work at all and also ignoring path looks broken. assertTrue(compare("/", "users", new String[] { "/system/superuser/lastaccess", "/system/superuser/pswd", "/system/anonymous/pswd", "/admin/peter/pswd", "/admin/eric/pswd", }, new String[] { // subdirectories of these paths might be shuffled, but values have to match. "/system/superuser/roles", "/system/anonymous/roles" })); For example all password properties should be ignored, but they are not. On "/system/anonymous/roles" "deepcompare" should be used, but roles are still marked as different because of different order. "Deepcompare" needs to be used also is usergroups and user roles workspaces. For example "/demo-project-editors/groups", "/demo-project-editors/roles", "/demo-project-members/groups", "/demo-project-members/roles", "/demo-project-publishers/groups", "/demo-project-publishers/roles" |
| Comment by Roman Kovařík [ 01/Apr/14 ] |
Otherwise really good! That's what we need |
| Comment by Robert Šiška [ 09/May/14 ] |
|
XSLT now sorts the roles'/groups' IDs on user* workspaces and ignores pswd and lastaccess properties. The Java code for comparing (linked to this ticket) is therefore useless but might have a use for other repositories... If any problems related to this emerge, let's create a new more specific ticket. |
| Comment by Roman Kovařík [ 09/May/14 ] |
|
Final commit: |