add testing credentials for file storage

This commit is contained in:
Fredrik Teschke committed 2015-01-23 15:01:26 +01:00
1 parent 5fd5c67cd3
commit b18632dda6
7 files changed
+86 -45

No files matched your search

@@ -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();