Package apoc.util.s3

Class S3TestUtil

java.lang.Object
apoc.util.s3.S3TestUtil

public class S3TestUtil extends Object
Utility class for testing Amazon S3 related functionality.
  • Constructor Details

    • S3TestUtil

      public S3TestUtil()
  • Method Details

    • readS3FileToString

      public static String readS3FileToString(String s3Url) throws com.amazonaws.AmazonClientException
      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:
      MalformedURLException
      com.amazonaws.AmazonClientException
    • assertStringFileEquals

      public static void assertStringFileEquals(String expected, String s3Url)
    • assertS3KeyEventually

      public static void assertS3KeyEventually(Runnable runnable)