commit | d6a256894872dbd44748c7dc3041aedeac264d62 | [log] [tgz] |
---|---|---|
author | Matthias Sohn <matthias.sohn@sap.com> | Fri Mar 14 10:53:30 2025 +0100 |
committer | Matthias Sohn <matthias.sohn@sap.com> | Fri Mar 14 10:53:30 2025 +0100 |
tree | 6afe43557695687dbe930a92cb93bcf03ddd8f72 | |
parent | 4939b41c121393de9d383f13f8681f00291d704a [diff] |
Use MoreFiles.deleteRecursively with option ALLOW_INSECURE otherwise all uploadvalidator tests fail on MacOS with InsecureRecursiveDeleteException. See Id783a2b9fdd67608d72bdd3b6fbf03ccd4cbe425 Change-Id: I087ee9fd73bf28b1221c999a31769a959d9a3d56
diff --git a/src/test/java/com/googlesource/gerrit/plugins/uploadvalidator/ValidatorTestCase.java b/src/test/java/com/googlesource/gerrit/plugins/uploadvalidator/ValidatorTestCase.java index 2702f95..09ba4af 100644 --- a/src/test/java/com/googlesource/gerrit/plugins/uploadvalidator/ValidatorTestCase.java +++ b/src/test/java/com/googlesource/gerrit/plugins/uploadvalidator/ValidatorTestCase.java
@@ -15,6 +15,7 @@ package com.googlesource.gerrit.plugins.uploadvalidator; import com.google.common.io.MoreFiles; +import com.google.common.io.RecursiveDeleteOption; import java.io.File; import java.io.IOException; import org.eclipse.jgit.lib.Repository; @@ -36,7 +37,7 @@ public void cleanup() throws IOException { repo.close(); if (repoFolder.exists()) { - MoreFiles.deleteRecursively(repoFolder.toPath()); + MoreFiles.deleteRecursively(repoFolder.toPath(), RecursiveDeleteOption.ALLOW_INSECURE); } } }