mirror of
https://github.com/eclipse-sailing-analytics/sailing-analytics.git
synced 2026-11-03 17:49:40 +00:00
add testing credentials for file storage
This commit is contained in:
1 parent
5fd5c67cd3
commit
b18632dda6
7 files changed
+86
-45
No files matched your search
+12
-4
@@ -8,17 +8,25 @@ import java.net.URISyntaxException;
|
||||
import java.net.URL;
|
||||
|
||||
import org.apache.commons.io.IOUtils;
|
||||
import org.junit.Before;
|
||||
import org.junit.Test;
|
||||
|
||||
import com.sap.sse.filestorage.FileStorageService;
|
||||
import com.sap.sse.filestorage.impl.AmazonS3FileStorageServiceImpl;
|
||||
import com.sap.sse.filestorage.InvalidPropertiesException;
|
||||
import com.sap.sse.filestorage.OperationFailedException;
|
||||
import com.sap.sse.filestorage.testsupport.AmazonS3TestSupport;
|
||||
|
||||
public class AmazonS3Test {
|
||||
private final String teamImageFile = "Bundesliga2014_Regatta6_eventteaser.jpg";
|
||||
private final FileStorageService storageService = new AmazonS3FileStorageServiceImpl();
|
||||
@Before
|
||||
public void setup() throws InvalidPropertiesException {
|
||||
storageService = AmazonS3TestSupport.createService();
|
||||
}
|
||||
|
||||
private static final String teamImageFile = "Bundesliga2014_Regatta6_eventteaser.jpg";
|
||||
private FileStorageService storageService;
|
||||
|
||||
@Test
|
||||
public void testStoreAndRemoveFileTest() throws URISyntaxException, IOException {
|
||||
public void testStoreAndRemoveFileTest() throws URISyntaxException, IOException, OperationFailedException, InvalidPropertiesException {
|
||||
URL fileUrl = getClass().getResource("/" + teamImageFile);
|
||||
URI fileUri = new URI(fileUrl.toString());
|
||||
long length = new File(fileUri).length();
|
||||
|
||||
Reference in new issue
Block a user