Package apoc.util.s3
Class S3TestUtil
java.lang.Object
apoc.util.s3.S3TestUtil
Utility class for testing Amazon S3 related functionality.
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionstatic voidassertS3KeyEventually(Runnable runnable) static voidassertStringFileEquals(String expected, String s3Url) static com.amazonaws.services.s3.model.S3ObjectgetS3Object(String s3Url) static StringreadS3FileToString(String s3Url) Read file object as a string from S3 bucket.
-
Constructor Details
-
S3TestUtil
public S3TestUtil()
-
-
Method Details
-
readS3FileToString
Read file object as a string from S3 bucket. This code expects valid AWS credentials are set up.- Parameters:
s3Url- String containing url to S3 bucket.- Returns:
- the s3 string object
- Throws:
com.amazonaws.AmazonClientException
-
getS3Object
public static com.amazonaws.services.s3.model.S3Object getS3Object(String s3Url) throws MalformedURLException, com.amazonaws.AmazonClientException - Throws:
MalformedURLExceptioncom.amazonaws.AmazonClientException
-
assertStringFileEquals
-
assertS3KeyEventually
-