Package org.apache.flink.testutils.s3
Class S3TestCredentials
java.lang.Object
org.apache.flink.testutils.s3.S3TestCredentials
Access to credentials to access S3 buckets during integration tests.
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionstatic voidChecks whether credentials are available in the environment variables of this JVM.static StringGets the S3 Access Key.static StringGets the S3 Secret Key.static StringGets the URI for the path under which all tests should put their data.static StringgetTestBucketUriWithScheme(String scheme) Gets the URI for the path under which all tests should put their data.
-
Constructor Details
-
S3TestCredentials
public S3TestCredentials()
-
-
Method Details
-
assumeCredentialsAvailable
public static void assumeCredentialsAvailable()Checks whether credentials are available in the environment variables of this JVM. If not, throws anAssumptionViolatedExceptionwhich causes JUnit tests to be skipped. -
getS3AccessKey
Gets the S3 Access Key.This method throws an exception if the key is not available. Tests should use
assumeCredentialsAvailable()to skip tests when credentials are not available. -
getS3SecretKey
Gets the S3 Secret Key.This method throws an exception if the key is not available. Tests should use
assumeCredentialsAvailable()to skip tests when credentials are not available. -
getTestBucketUri
Gets the URI for the path under which all tests should put their data.This method throws an exception if the bucket was not configured. Tests should use
assumeCredentialsAvailable()to skip tests when credentials are not available. -
getTestBucketUriWithScheme
Gets the URI for the path under which all tests should put their data.This method throws an exception if the bucket was not configured. Tests should use
assumeCredentialsAvailable()to skip tests when credentials are not available.
-