mirror of https://github.com/apache/jclouds.git
Ignore non-existent container in deleteContainer
All other blobstore providers allow this operation. Further this matches the behavior of TransientStorageStrategy.deleteContainer. This commit prevents a spurious error message from deleteContainerOrWarnIfUnable after test suite completion.
This commit is contained in:
parent
ac22383648
commit
fc4b072a26
|
@ -131,6 +131,9 @@ public class FilesystemStorageStrategyImpl implements LocalStorageStrategy {
|
|||
@Override
|
||||
public void deleteContainer(String container) {
|
||||
filesystemContainerNameValidator.validate(container);
|
||||
if (!containerExists(container)) {
|
||||
return;
|
||||
}
|
||||
deleteDirectory(container, null);
|
||||
}
|
||||
|
||||
|
|
|
@ -620,11 +620,7 @@ public class FilesystemAsyncBlobStoreTest {
|
|||
}
|
||||
|
||||
public void testDeleteContainer_NotExistingContainer() {
|
||||
try {
|
||||
blobStore.deleteContainer(CONTAINER_NAME);
|
||||
fail("No error when container doesn't exist");
|
||||
} catch (Exception e) {
|
||||
}
|
||||
}
|
||||
|
||||
public void testDeleteContainer_EmptyContanier() {
|
||||
|
|
|
@ -282,12 +282,8 @@ public class FilesystemStorageStrategyImplTest {
|
|||
TestUtils.directoryExists(CONTAINER_NAME, false);
|
||||
}
|
||||
|
||||
public void testDeleteContainer_ErrorWhenNotExists() {
|
||||
try {
|
||||
public void testDeleteContainerNoErrorWhenNotExists() {
|
||||
storageStrategy.deleteContainer(CONTAINER_NAME);
|
||||
fail("Exception not throwed");
|
||||
} catch (Exception e) {
|
||||
}
|
||||
}
|
||||
|
||||
public void testGetAllContainerNames() {
|
||||
|
|
Loading…
Reference in New Issue