Added "validateAllDataLayers" setting (default false)

When true, the hashes of every layer are validated when building a data resource. When false, only the final layer's hash is validated.
This commit is contained in:
CalDescent
2021-10-24 14:37:29 +01:00
parent a418fb18b6
commit 52a94e3256
4 changed files with 36 additions and 0 deletions

View File

@@ -95,6 +95,7 @@ public class ArbitraryDataMergeTests extends Common {
// Now merge the patch with the original path
ArbitraryDataCombiner combiner = new ArbitraryDataCombiner(path1, patchPath, signature);
combiner.setShouldValidateHashes(true);
combiner.combine();
Path finalPath = combiner.getFinalPath();
@@ -214,6 +215,7 @@ public class ArbitraryDataMergeTests extends Common {
// Now merge the patch with the original path
ArbitraryDataCombiner combiner = new ArbitraryDataCombiner(tempDir1, patchPath, signature);
combiner.setShouldValidateHashes(true);
combiner.combine();
Path finalPath = combiner.getFinalPath();
@@ -281,6 +283,7 @@ public class ArbitraryDataMergeTests extends Common {
// Now merge the patch with the original path
ArbitraryDataCombiner combiner = new ArbitraryDataCombiner(tempDir1, patchPath, signature);
combiner.setShouldValidateHashes(true);
combiner.combine();
Path finalPath = combiner.getFinalPath();
@@ -354,6 +357,7 @@ public class ArbitraryDataMergeTests extends Common {
// Now merge the patch with the original path
ArbitraryDataCombiner combiner = new ArbitraryDataCombiner(tempDir1, patchPath, signature);
combiner.setShouldValidateHashes(true);
combiner.combine();
Path finalPath = combiner.getFinalPath();
@@ -425,6 +429,7 @@ public class ArbitraryDataMergeTests extends Common {
// Now merge the patch with the original path
ArbitraryDataCombiner combiner = new ArbitraryDataCombiner(tempDir1, patchPath, signature);
combiner.setShouldValidateHashes(true);
combiner.combine();
Path finalPath = combiner.getFinalPath();