Details
-
Bug
-
Status: Open
-
Major
-
Resolution: Unresolved
-
None
-
None
-
None
Description
When attempting to list a container and setting prefix. delimiter, and marker to "", the filesystem blobstore does not return any entries. Against AWS, setting the values to an empty is tantamount to not setting them at all.
Here is an example that fails. A similar test against AWS succeeds.
public void testList_EmptyOptionSingleContainer() throws IOException { blobStore.createContainerInLocation(null, CONTAINER_NAME); checkForContainerContent(CONTAINER_NAME, null); TestUtils.createBlobsInContainer(CONTAINER_NAME, "a", "b", "c"); // Test listing where we set the prefix and delimiter to empty string ListContainerOptions options = ListContainerOptions.Builder.delimiter("") .prefix("").afterMarker(""); PageSet<? extends StorageMetadata> rs = blobStore.list(CONTAINER_NAME, options); assertEquals(rs.size(), 3); Set<String> expected = Sets.newHashSet("a", "b", "c"); for (StorageMetadata sm : rs) { assertTrue(expected.contains(sm.getName())); expected.remove(sm.getName()); } assertTrue(expected.isEmpty()); }