Class S3StorageTest
java.lang.Object
de.iip_ecosphere.platform.deviceMgt.s3mock.S3StorageTest
Tests the S3Mock storage.
- Author:
- Dennis Pidun, University of Hildesheim, Holger Eichelberger, SSE
-
Field Summary
Fields -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionvoidGenerating a download IO for an invalid key shall return null.voidGenerating a download IO shall be handled by MinIO.voidTests that requesting the prefix works.voidListing shall be handled by MinIO.static voidstartup()Creates a mock storage.static voidteardown()Destroys the mock storage.voidTests that uploading a file correctly fails.voidTests that uploading a file works.
-
Field Details
-
A_BUCKET
- See Also:
-
A_PREFIX
- See Also:
-
A_PATH
- See Also:
-
AN_URL
- See Also:
-
AN_INVALID_PATH
- See Also:
-
api
private static io.findify.s3mock.S3Mock api -
client
private static com.amazonaws.services.s3.AmazonS3 client -
connUrl
-
-
Constructor Details
-
S3StorageTest
public S3StorageTest()
-
-
Method Details
-
startup
public static void startup()Creates a mock storage. -
teardown
public static void teardown()Destroys the mock storage. -
list_shouldAskStorage
public void list_shouldAskStorage()Listing shall be handled by MinIO. -
generateDownloadUrl_shouldAskStorage
public void generateDownloadUrl_shouldAskStorage()Generating a download IO shall be handled by MinIO. -
generateDownloadUrl_forInvalidKey_returnsNull
public void generateDownloadUrl_forInvalidKey_returnsNull()Generating a download IO for an invalid key shall return null. -
getPrefix_isSet
public void getPrefix_isSet()Tests that requesting the prefix works. -
uploadFile_successful
Tests that uploading a file works.- Throws:
IOException- shall not occur
-
uploadFile_fileNotFound
public void uploadFile_fileNotFound()Tests that uploading a file correctly fails.
-