Skip to content
Permalink
Browse files
Do not allow options in filesystem clearContainer
This requires some additional logic to query by prefix.  Test
regression from 22ce5484a412bc06ef62995675c07e7a85f66bdf.
  • Loading branch information
gaul committed Nov 15, 2018
1 parent 85c46b8 commit 9a7a503de7a144db9e047efb78c52e652d539edb
Showing 4 changed files with 17 additions and 0 deletions.
@@ -37,4 +37,9 @@ protected Iterable<Module> setupModules() {
public void testSetContainerAccess() throws Exception {
throw new SkipException("jdbc does not support anonymous access");
}

@Override
public void testClearWithOptions() throws InterruptedException {
throw new SkipException("jdbc does not support clear with options");
}
}
@@ -47,6 +47,7 @@
import org.jclouds.jdbc.predicates.validators.JdbcContainerNameValidator;
import org.jclouds.jdbc.service.JdbcService;

import com.google.common.base.Preconditions;
import com.google.common.collect.ImmutableList;

/**
@@ -185,6 +186,7 @@ public void clearContainer(String container) {
*/
@Override
public void clearContainer(String container, ListContainerOptions options) {
Preconditions.checkArgument(options.getPrefix() == null, "prefix not yet implemented");
if (options.getDir() != null) {
jdbcService.deleteBlobsByDirectory(container, options.getDir(), true);
}
@@ -39,4 +39,9 @@ protected Iterable<Module> setupModules() {
public void testSetContainerAccess() throws Exception {
throw new SkipException("jdbc does not support anonymous access");
}

@Override
public void testClearWithOptions() throws InterruptedException {
throw new SkipException("jdbc does not support clear with options");
}
}
@@ -46,4 +46,9 @@ public void testBlobNameEscaping(Set<String> blobNames) throws InterruptedExcept
public void testSetContainerAccess() throws Exception {
throw new SkipException("jdbc does not support anonymous access");
}

@Override
public void testClearWithOptions() throws InterruptedException {
throw new SkipException("jdbc does not support clear with options");
}
}

0 comments on commit 9a7a503

Please sign in to comment.