No exception for missing file on cancelled installation

This commit is contained in:
René Pfeuffer
2020-11-24 18:18:50 +01:00
parent b67a0cb89d
commit fc9176ec5a
2 changed files with 15 additions and 6 deletions

View File

@@ -59,8 +59,13 @@ class PendingPluginInstallationTest {
}
@Test
void shouldThrowExceptionIfCancelFailed(@TempDir Path directory) {
void shouldThrowExceptionIfCancelFailed(@TempDir Path directory) throws IOException {
Path file = directory.resolve("file");
Files.createDirectory(file);
Path makeFileNotDeletable = file.resolve("not_deletable");
Files.write(makeFileNotDeletable, "42".getBytes());
when(plugin.getDescriptor().getInformation().getName()).thenReturn("scm-awesome-plugin");
PendingPluginInstallation installation = new PendingPluginInstallation(plugin, file);