public class S3TestCredentials extends Object
Constructor and Description |
---|
S3TestCredentials() |
Modifier and Type | Method and 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.
|
public static void assumeCredentialsAvailable()
AssumptionViolatedException
which causes JUnit tests to be skipped.public static String getS3AccessKey()
This method throws an exception if the key is not available. Tests should use assumeCredentialsAvailable()
to skip tests when credentials are not available.
public static String getS3SecretKey()
This method throws an exception if the key is not available. Tests should use assumeCredentialsAvailable()
to skip tests when credentials are not available.
public static String getTestBucketUri()
This method throws an exception if the bucket was not configured. Tests should use assumeCredentialsAvailable()
to skip tests when credentials are not available.
public static String getTestBucketUriWithScheme(String scheme)
This method throws an exception if the bucket was not configured. Tests should use assumeCredentialsAvailable()
to skip tests when credentials are not available.
Copyright © 2014–2024 The Apache Software Foundation. All rights reserved.