(test) Removing /tmp-guardrails as it doesn't hold in CI

This commit is contained in:
Viktor Lofgren 2023-10-02 16:52:59 +02:00
parent 23be648456
commit 40768e935b
4 changed files with 0 additions and 28 deletions

View File

@ -8,14 +8,7 @@ import java.nio.file.Path;
import java.util.Arrays;
public class TestUtil {
private static boolean isTempDir(Path dir) {
return dir.startsWith("/tmp") || dir.toString().contains("tmp");
}
public static void clearTempDir(Path dir) {
if (!isTempDir(dir)) {
throw new IllegalArgumentException("Refusing to recursively delete directory with that name");
}
if (Files.isDirectory(dir)) {
for (File f : dir.toFile().listFiles()) {
File[] files = f.listFiles();

View File

@ -8,14 +8,7 @@ import java.nio.file.Path;
import java.util.Arrays;
public class TestUtil {
private static boolean isTempDir(Path dir) {
return dir.startsWith("/tmp") || dir.toString().contains("tmp");
}
public static void clearTempDir(Path dir) {
if (!isTempDir(dir)) {
throw new IllegalArgumentException("Refusing to recursively delete directory with that name");
}
if (Files.isDirectory(dir)) {
for (File f : dir.toFile().listFiles()) {
File[] files = f.listFiles();

View File

@ -8,14 +8,7 @@ import java.nio.file.Path;
import java.util.Arrays;
public class TestUtil {
private static boolean isTempDir(Path dir) {
return dir.startsWith("/tmp") || dir.toString().contains("tmp");
}
public static void clearTempDir(Path dir) {
if (!isTempDir(dir)) {
throw new IllegalArgumentException("Refusing to recursively delete directory with that name");
}
if (Files.isDirectory(dir)) {
for (File f : dir.toFile().listFiles()) {
File[] files = f.listFiles();

View File

@ -8,14 +8,7 @@ import java.nio.file.Path;
import java.util.Arrays;
public class TestUtil {
private static boolean isTempDir(Path dir) {
return dir.startsWith("/tmp") || dir.toString().contains("tmp");
}
public static void clearTempDir(Path path) {
if (!isTempDir(path)) {
throw new IllegalArgumentException("Refusing to recursively delete directory with that name");
}
if (Files.isDirectory(path)) {
for (File f : path.toFile().listFiles()) {
File[] files = f.listFiles();