Created
May 14, 2013 21:26
-
-
Save anonymous/5579687 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
package com.automatedev.releasequeue.debian; | |
import com.amazonaws.auth.BasicAWSCredentials; | |
import com.amazonaws.services.s3.AmazonS3Client; | |
import com.amazonaws.services.s3.iterable.S3Objects; | |
import com.amazonaws.services.s3.model.S3ObjectSummary; | |
import com.automatedev.releasequeue.debian.store.Key; | |
import junit.framework.Test; | |
import java.util.ArrayList; | |
import java.util.List; | |
public class FakeS3TestCase { | |
@org.junit.Test | |
public void testGetObjects() | |
{ | |
String awsAccessKey = "xxx"; | |
String awsSecretAccessKey = "xxx"; | |
BasicAWSCredentials credentials = new BasicAWSCredentials(awsAccessKey, awsSecretAccessKey); | |
AmazonS3Client amazonS3 = new AmazonS3Client(credentials); | |
amazonS3.setEndpoint("http://fakes3:4567"); | |
for (S3ObjectSummary summary : S3Objects.withPrefix(amazonS3, "releasequeue", "automatedev")) { | |
System.out.println("summary.getKey() = " + summary.getKey()); | |
} | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment