[MGNLTOOLS-78] Make VersionStorePurgeCommand Magnolia 5.x compliant Created: 06/Mar/15  Updated: 26/May/15  Resolved: 05/May/15

Status: Closed
Project: Repository Tools
Component/s: None
Affects Version/s: 1.5
Fix Version/s: 1.6.2

Type: Bug Priority: Major
Reporter: Zdenek Skodik Assignee: Antonín Juran
Resolution: Fixed Votes: 0
Labels: support
Remaining Estimate: Not Specified
Time Spent: Not Specified
Original Estimate: Not Specified

Issue Links:
Relates
relates to MGNLTOOLS-77 Let GarbageCollectorCommand leverage ... Closed
Template:
Acceptance criteria:
Empty
Task DoD:
[ ]* Doc/release notes changes? Comment present?
[ ]* Downstream builds green?
[ ]* Solution information and context easily available?
[ ]* Tests
[ ]* FixVersion filled and not yet released
[ ]  Architecture Decision Record (ADR)
Bug DoR:
[ ]* Steps to reproduce, expected, and actual results filled
[ ]* Affected version filled
Date of First Response:

 Description   

Or remove it from the UI as currently it operates on workspaces like dms or data.



 Comments   
Comment by Roman Kovařík [ 05/May/15 ]

Minor remarks:

  • VersionStorePurgeCommand: @deprecated since 1.>>2<<.2
  • VersionStorePurgeCommandTest
    • you can create the command in setUp (and maybe also the nodes) since those are always the same
    • testVersionsOfNodesExistAfterExecute: it took me a while to understand why the nodes should exist after execute, it could be probably named e.g. testReferencedNodesExistAfterExecute
    • You can use node.getName() so you don't need to write Strings again (to prevent a typo):
      - assertThat(mgnlVersionSession.getRootNode(), not(hasNode("versionOfWebsiteNode")));
      + assertThat(mgnlVersionSession.getRootNode(), not(hasNode(versionOfWebsiteNode.getName())));
      

      Otherwise looks good.

  • you also can raise the clover coverage in pom.xml after integration (<cloverCoverageThreshold>24</cloverCoverageThreshold>). It can be raised to 30.
Comment by Antonín Juran [ 05/May/15 ]

I can't use node.getName() in this case, because the node already does not exists:

- assertThat(mgnlVersionSession.getRootNode(), not(hasNode("versionOfWebsiteNode")));
+ assertThat(mgnlVersionSession.getRootNode(), not(hasNode(versionOfWebsiteNode.getName())));
Generated at Mon Feb 12 10:40:53 CET 2024 using Jira 9.4.2#940002-sha1:46d1a51de284217efdcb32434eab47a99af2938b.