Class S3StorageTest
- java.lang.Object
-
- de.iip_ecosphere.platform.deviceMgt.minio.S3StorageTest
-
public class S3StorageTest extends java.lang.ObjectTests the S3 storage.- Author:
- Dennis Pidun, University of Hildesheim
-
-
Field Summary
Fields Modifier and Type Field Description static java.lang.StringA_BUCKETstatic java.lang.StringA_PATHstatic java.lang.StringA_PREFIXstatic java.lang.StringAN_INVALID_PATHstatic java.lang.StringAN_URLprivate static intEXPIRE_TIME
-
Constructor Summary
Constructors Constructor Description S3StorageTest()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description voidgenerateDownloadUrl_forInvalidKey_returnsNull()Generating a download IO for an invalid key shall return null.voidgenerateDownloadUrl_shouldAskMinio()Generating a download IO shall be handled by MinIO.voidgetPrefix_isSet()Tests that requesting the prefix works.voidlist_shouldAskMinio()Listing shall be handled by MinIO.voiduploadFile_fileNotFound()Tests that uploading a file correctly fails.voiduploadFile_successful()Tests that uploading a file works.
-
-
-
Field Detail
-
A_BUCKET
public static final java.lang.String A_BUCKET
- See Also:
- Constant Field Values
-
A_PREFIX
public static final java.lang.String A_PREFIX
- See Also:
- Constant Field Values
-
A_PATH
public static final java.lang.String A_PATH
- See Also:
- Constant Field Values
-
AN_URL
public static final java.lang.String AN_URL
- See Also:
- Constant Field Values
-
AN_INVALID_PATH
public static final java.lang.String AN_INVALID_PATH
- See Also:
- Constant Field Values
-
EXPIRE_TIME
private static final int EXPIRE_TIME
- See Also:
- Constant Field Values
-
-
Method Detail
-
list_shouldAskMinio
public void list_shouldAskMinio()
Listing shall be handled by MinIO.
-
generateDownloadUrl_shouldAskMinio
public void generateDownloadUrl_shouldAskMinio() throws java.lang.ExceptionGenerating a download IO shall be handled by MinIO.- Throws:
java.lang.Exception- shall not occur
-
generateDownloadUrl_forInvalidKey_returnsNull
public void generateDownloadUrl_forInvalidKey_returnsNull() throws java.lang.ExceptionGenerating a download IO for an invalid key shall return null.- Throws:
java.lang.Exception- shall not occur
-
getPrefix_isSet
public void getPrefix_isSet()
Tests that requesting the prefix works.
-
uploadFile_successful
public void uploadFile_successful() throws java.io.IOException, io.minio.errors.XmlParserException, io.minio.errors.ServerException, java.security.NoSuchAlgorithmException, java.io.IOException, io.minio.errors.InvalidResponseException, java.security.InvalidKeyException, io.minio.errors.InternalException, io.minio.errors.InsufficientDataException, io.minio.errors.ErrorResponseExceptionTests that uploading a file works.- Throws:
java.io.IOException- shall not occurio.minio.errors.XmlParserException- shall not occurio.minio.errors.ServerException- shall not occurjava.security.NoSuchAlgorithmException- shall not occurjava.io.IOException- shall not occurio.minio.errors.InvalidResponseException- shall not occurjava.security.InvalidKeyException- shall not occurio.minio.errors.InternalException- shall not occurio.minio.errors.InsufficientDataException- shall not occurio.minio.errors.ErrorResponseException- shall not occur
-
uploadFile_fileNotFound
public void uploadFile_fileNotFound() throws io.minio.errors.XmlParserException, io.minio.errors.ServerException, java.security.NoSuchAlgorithmException, java.io.IOException, io.minio.errors.InvalidResponseException, java.security.InvalidKeyException, io.minio.errors.InternalException, io.minio.errors.InsufficientDataException, io.minio.errors.ErrorResponseExceptionTests that uploading a file correctly fails.- Throws:
java.io.IOException- shall not occurio.minio.errors.XmlParserException- shall not occurio.minio.errors.ServerException- shall not occurjava.security.NoSuchAlgorithmException- shall not occurjava.io.IOException- shall not occurio.minio.errors.InvalidResponseException- shall not occurjava.security.InvalidKeyException- shall not occurio.minio.errors.InternalException- shall not occurio.minio.errors.InsufficientDataException- shall not occurio.minio.errors.ErrorResponseException- shall not occur
-
-