Skip to content
This repository was archived by the owner on Jul 25, 2020. It is now read-only.

Commit 9a7a503

Browse files
committed
Do not allow options in filesystem clearContainer
This requires some additional logic to query by prefix. Test regression from 22ce5484a412bc06ef62995675c07e7a85f66bdf.
1 parent 85c46b8 commit 9a7a503

File tree

4 files changed

+17
-0
lines changed

4 files changed

+17
-0
lines changed

h2-jdbc/src/test/java/org/jclouds/h2/jdbc/blobstore/H2JdbcContainerIntegrationTest.java

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -37,4 +37,9 @@ protected Iterable<Module> setupModules() {
3737
public void testSetContainerAccess() throws Exception {
3838
throw new SkipException("jdbc does not support anonymous access");
3939
}
40+
41+
@Override
42+
public void testClearWithOptions() throws InterruptedException {
43+
throw new SkipException("jdbc does not support clear with options");
44+
}
4045
}

jdbc/src/main/java/org/jclouds/jdbc/strategy/JdbcStorageStrategy.java

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -47,6 +47,7 @@
4747
import org.jclouds.jdbc.predicates.validators.JdbcContainerNameValidator;
4848
import org.jclouds.jdbc.service.JdbcService;
4949

50+
import com.google.common.base.Preconditions;
5051
import com.google.common.collect.ImmutableList;
5152

5253
/**
@@ -185,6 +186,7 @@ public void clearContainer(String container) {
185186
*/
186187
@Override
187188
public void clearContainer(String container, ListContainerOptions options) {
189+
Preconditions.checkArgument(options.getPrefix() == null, "prefix not yet implemented");
188190
if (options.getDir() != null) {
189191
jdbcService.deleteBlobsByDirectory(container, options.getDir(), true);
190192
}

jdbc/src/test/java/org/jclouds/jdbc/integration/EclipselinkH2ContainerIntegrationTest.java

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -39,4 +39,9 @@ protected Iterable<Module> setupModules() {
3939
public void testSetContainerAccess() throws Exception {
4040
throw new SkipException("jdbc does not support anonymous access");
4141
}
42+
43+
@Override
44+
public void testClearWithOptions() throws InterruptedException {
45+
throw new SkipException("jdbc does not support clear with options");
46+
}
4247
}

jdbc/src/test/java/org/jclouds/jdbc/integration/HibernateHsqldbContainerIntegrationTest.java

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -46,4 +46,9 @@ public void testBlobNameEscaping(Set<String> blobNames) throws InterruptedExcept
4646
public void testSetContainerAccess() throws Exception {
4747
throw new SkipException("jdbc does not support anonymous access");
4848
}
49+
50+
@Override
51+
public void testClearWithOptions() throws InterruptedException {
52+
throw new SkipException("jdbc does not support clear with options");
53+
}
4954
}

0 commit comments

Comments
 (0)