kazurayam / materialstore

A domain-specific file system to store "materials" (screenshots, HTML, JSON, XML) collected during End-to-End testings using Selenium WebDriver etc. Features to make "diff" and compiling HTML reports are also included. This is written in pure Java8
Apache License 2.0
0 stars 0 forks source link

extending StoreCleaner: should support cleaning stuff up while preserving 2 or more units #334

Closed kazurayam closed 2 years ago

kazurayam commented 2 years ago

At 0.11.2, com.kazurayam.materialstore.manage.StoreCleaner cleans up stuff in the store directory while preseving only 1 latest unit of artifacts (JobTimestamp directories and a report HTML file) per a JobName.

I want more of flexibility. I want the StoreCleaner to be able to preserve 2 or more units of artifacts. I want to specify the preservation range

Once implemented, I would use the StoreClear lightly --- less number of preserves --- for the local store directory; and I would use it heavily --- more number of preserves, say 10, --- for the remote/backup store directory.

Once implemented, the remote store directory will be well-maintained; will be suitable to share the reports by the team.

kazurayam commented 2 years ago

will add List<JobTimestamp> com.kazurayam.materialstore.filesystem.Store#findDifferentiatingJobTimestamps(JobName)

This method will return a list of JobTimestamp which contains indexEntries with "category":"diff". The list will be sorted descending ordoer of timestamp string.

Provided with this method implemented, it is just easy to extend the StoreCleaner to be able to preserve stuffs as specified.

kazurayam commented 2 years ago

aimed at ver 0.11.3

kazurayam commented 2 years ago

done at 0.11.4