org.jets3t.tests
Class BaseStorageServiceTests
java.lang.Object
junit.framework.Assert
junit.framework.TestCase
org.jets3t.tests.BaseStorageServiceTests
- All Implemented Interfaces:
- junit.framework.Test
- Direct Known Subclasses:
- TestGoogleStorageService, TestRestS3Service, TestRestS3ServiceToGoogleStorage
public abstract class BaseStorageServiceTests
- extends junit.framework.TestCase
Runs generic functional tests that any storage service implementation should be
able to perform.
Any test cases for specific StorageService implementations should extend this class as a
starting point, then add test cases specific to that particular implementation.
Methods inherited from class junit.framework.TestCase |
countTestCases, createResult, getName, run, run, runBare, runTest, setName, setUp, tearDown, toString |
Methods inherited from class junit.framework.Assert |
assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertFalse, assertFalse, assertNotNull, assertNotNull, assertNotSame, assertNotSame, assertNull, assertNull, assertSame, assertSame, assertTrue, assertTrue, fail, fail, failNotEquals, failNotSame, failSame |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
TARGET_SERVICE_S3
protected static final java.lang.String TARGET_SERVICE_S3
- See Also:
- Constant Field Values
TARGET_SERVICE_GS
protected static final java.lang.String TARGET_SERVICE_GS
- See Also:
- Constant Field Values
TEST_PROPERTIES_FILENAME
protected java.lang.String TEST_PROPERTIES_FILENAME
testProperties
protected java.util.Properties testProperties
BaseStorageServiceTests
public BaseStorageServiceTests()
throws java.lang.Exception
- Throws:
java.lang.Exception
getCredentials
protected abstract ProviderCredentials getCredentials()
throws java.lang.Exception
- Throws:
java.lang.Exception
getStorageService
protected abstract RestStorageService getStorageService(ProviderCredentials credentials)
throws java.lang.Exception
- Throws:
java.lang.Exception
getTargetService
protected abstract java.lang.String getTargetService()
buildAccessControlList
protected abstract AccessControlList buildAccessControlList()
getBucketLoggingStatus
protected abstract StorageBucketLoggingStatus getBucketLoggingStatus(java.lang.String targetBucketName,
java.lang.String logfilePrefix)
throws java.lang.Exception
- Throws:
java.lang.Exception
getBucketNameForTest
protected java.lang.String getBucketNameForTest(java.lang.String testName)
throws java.lang.Exception
- Parameters:
testName
-
- Returns:
- unique per-account and per-test bucket name
- Throws:
java.lang.Exception
createBucketForTest
protected StorageBucket createBucketForTest(java.lang.String testName)
throws java.lang.Exception
- Throws:
java.lang.Exception
createBucketForTest
protected StorageBucket createBucketForTest(java.lang.String testName,
java.lang.String location)
throws java.lang.Exception
- Throws:
java.lang.Exception
deleteAllObjectsInBucket
protected void deleteAllObjectsInBucket(java.lang.String bucketName)
cleanupBucketForTest
protected void cleanupBucketForTest(java.lang.String testName,
boolean deleteAllObjects)
cleanupBucketForTest
protected void cleanupBucketForTest(java.lang.String testName)
testListBuckets
public void testListBuckets()
throws java.lang.Exception
- Throws:
java.lang.Exception
testBucketManagement
public void testBucketManagement()
throws java.lang.Exception
- Throws:
java.lang.Exception
testBucketStatusLookup
public void testBucketStatusLookup()
throws java.lang.Exception
- Throws:
java.lang.Exception
testBucketLocations
public void testBucketLocations()
throws java.lang.Exception
- Throws:
java.lang.Exception
testObjectManagement
public void testObjectManagement()
throws java.lang.Exception
- Throws:
java.lang.Exception
testDirectoryPlaceholderObjects
public void testDirectoryPlaceholderObjects()
throws java.lang.Exception
- Throws:
java.lang.Exception
testCopyObjects
public void testCopyObjects()
throws java.lang.Exception
- Throws:
java.lang.Exception
testUnicodeData
public void testUnicodeData()
throws java.lang.Exception
- Throws:
java.lang.Exception
testACLManagement
public void testACLManagement()
throws java.lang.Exception
- Throws:
java.lang.Exception
testACLManagementViaRestHeaders
public void testACLManagementViaRestHeaders()
throws java.lang.Exception
- Throws:
java.lang.Exception
testObjectListing
public void testObjectListing()
throws java.lang.Exception
- Throws:
java.lang.Exception
testHashVerifiedUploads
public void testHashVerifiedUploads()
throws java.lang.Exception
- Throws:
java.lang.Exception
testIsObjectInBucket
public void testIsObjectInBucket()
throws java.lang.Exception
- Throws:
java.lang.Exception
testThreadedStorageService
public void testThreadedStorageService()
throws java.lang.Exception
- Throws:
java.lang.Exception
testSimpleThreadedStorageService
public void testSimpleThreadedStorageService()
throws java.lang.Exception
- Throws:
java.lang.Exception
testRecognizeDnsFriendlyBucketNames
public void testRecognizeDnsFriendlyBucketNames()
testFileComparer
public void testFileComparer()
throws java.lang.Exception
- Throws:
java.lang.Exception
testBucketLogging
public void testBucketLogging()
throws java.lang.Exception
- Throws:
java.lang.Exception