Skip to content

Commit

Permalink
Add tests.
Browse files Browse the repository at this point in the history
  • Loading branch information
dkocher committed Mar 27, 2024
1 parent d056019 commit 8b5debe
Show file tree
Hide file tree
Showing 2 changed files with 14 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -372,4 +372,11 @@ public AttributedList<Path> call() throws BackgroundException {
assertFalse(session.getClient().getConfiguration().getBoolProperty("s3service.disable-dns-buckets", true));
new S3DefaultDeleteFeature(session).delete(Collections.singletonList(bucket), new DisabledLoginCallback(), new Delete.DisabledCallback());
}

@Test
public void testListCommonPrefixSlashOnly() throws Exception {
final Path container = new Path("test-eu-central-1-cyberduck-unsupportedprefix", EnumSet.of(Path.Type.directory, Path.Type.volume));
final S3AccessControlListFeature acl = new S3AccessControlListFeature(session);
assertTrue(new S3ObjectListService(session, acl).list(container, new DisabledListProgressListener()).isEmpty());
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -358,4 +358,11 @@ public void testListPlaceholderDot() throws Exception {
assertTrue(new S3VersionedObjectListService(session, new S3AccessControlListFeature(session)).list(container, new DisabledListProgressListener()).contains(placeholder));
new S3DefaultDeleteFeature(session).delete(Collections.singletonList(placeholder), new DisabledLoginCallback(), new Delete.DisabledCallback());
}

@Test
public void testListCommonPrefixSlashOnly() throws Exception {
final Path container = new Path("test-eu-central-1-cyberduck-unsupportedprefix", EnumSet.of(Path.Type.directory, Path.Type.volume));
final S3AccessControlListFeature acl = new S3AccessControlListFeature(session);
assertTrue(new S3ObjectListService(session, acl).list(container, new DisabledListProgressListener()).isEmpty());
}
}

0 comments on commit 8b5debe

Please sign in to comment.