mirror of https://github.com/apache/jclouds.git
Live test demonstrating effectiveness of JCLOUDS-1401 fix.
This commit is contained in:
parent
34d272ac80
commit
9a65be789e
|
@ -48,7 +48,10 @@ import org.jclouds.ContextBuilder;
|
|||
import org.jclouds.aws.domain.SessionCredentials;
|
||||
import org.jclouds.blobstore.KeyNotFoundException;
|
||||
import org.jclouds.blobstore.domain.Blob;
|
||||
import org.jclouds.blobstore.domain.PageSet;
|
||||
import org.jclouds.blobstore.domain.StorageMetadata;
|
||||
import org.jclouds.blobstore.integration.internal.BaseBlobStoreIntegrationTest;
|
||||
import org.jclouds.blobstore.options.ListContainerOptions;
|
||||
import org.jclouds.domain.Credentials;
|
||||
import org.jclouds.http.HttpResponseException;
|
||||
import org.jclouds.io.ByteStreams2;
|
||||
|
@ -535,6 +538,23 @@ public class S3ClientLiveTest extends BaseBlobStoreIntegrationTest {
|
|||
}
|
||||
}
|
||||
|
||||
// JCLOUDS-1401
|
||||
public void testUnusualKeyCharacters() throws InterruptedException, ExecutionException, TimeoutException, IOException {
|
||||
String containerName = getContainerName();
|
||||
try {
|
||||
String dirName = "a%2Fb&xxx#?:$'\\\"<>čॐ";
|
||||
String fileName = "foo%3Abar.xml";
|
||||
addToContainerAndValidate(containerName, dirName + '/' + fileName);
|
||||
PageSet<? extends StorageMetadata> list = view.getBlobStore().list(containerName,
|
||||
ListContainerOptions.Builder.prefix(dirName + "/"));
|
||||
assertEquals(list.size(), 1);
|
||||
StorageMetadata md = list.iterator().next();
|
||||
assertEquals(md.getName(), dirName + '/' + fileName);
|
||||
} finally {
|
||||
returnContainer(containerName);
|
||||
}
|
||||
}
|
||||
|
||||
public void testMultipartSynchronously() throws InterruptedException, IOException {
|
||||
HashCode oneHundredOneConstitutionsMD5 = oneHundredOneConstitutions.hash(md5());
|
||||
String containerName = getContainerName();
|
||||
|
|
Loading…
Reference in New Issue