Package org.apache.flink.testutils.s3
Class S3TestCredentials
- java.lang.Object
-
- org.apache.flink.testutils.s3.S3TestCredentials
-
public class S3TestCredentials extends Object
Access to credentials to access S3 buckets during integration tests.
-
-
Constructor Summary
Constructors Constructor Description S3TestCredentials()
-
Method Summary
All Methods Static Methods Concrete Methods Modifier and Type Method Description static void
assumeCredentialsAvailable()
Checks whether credentials are available in the environment variables of this JVM.static String
getS3AccessKey()
Gets the S3 Access Key.static String
getS3SecretKey()
Gets the S3 Secret Key.static String
getTestBucketUri()
Gets the URI for the path under which all tests should put their data.static String
getTestBucketUriWithScheme(String scheme)
Gets the URI for the path under which all tests should put their data.
-
-
-
Method Detail
-
assumeCredentialsAvailable
public static void assumeCredentialsAvailable()
Checks whether credentials are available in the environment variables of this JVM. If not, throws anAssumptionViolatedException
which causes JUnit tests to be skipped.
-
getS3AccessKey
public static String 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
public static String 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
public static String 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
public static String getTestBucketUriWithScheme(String scheme)
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.
-
-