Ignores InsecureRecursiveDeleteException.
@@ -157,9 +157,19 @@ public class JibPluginIntegrationTest {
.resolve("main")
.resolve("resources")
.resolve("newfile"));
+ try {
BuildTask reexecutedJibDockerContextTask =
simpleTestProject.build("jibDockerContext").task(":jibDockerContext");
Assert.assertNotNull(reexecutedJibDockerContextTask);
Assert.assertEquals(TaskOutcome.SUCCESS, reexecutedJibDockerContextTask.getOutcome());
+
+ } catch (UnexpectedBuildFailure ex) {
+ // THis might happen on systems without SecureDirectoryStream, so we just ignore it.
+ // See com.google.common.io.MoreFiles#deleteDirectoryContents.
+ Assert.assertThat(
+ ex.getMessage(),
+ CoreMatchers.containsString(
+ "Export Docker context failed because cannot clear directory"));
+ }
}
}
