Documentation ¶
Overview ¶
Package storagetesting implements testing utilities and integration tests for storage.
Index ¶
- func AssertNotExist(t *testing.T, readBucket storage.ReadBucket, path string)
- func AssertObjectInfo(t *testing.T, readBucket storage.ReadBucket, path string, externalPath string, ...)
- func AssertObjectInfoEqual(t *testing.T, expected storage.ObjectInfo, actual storage.ObjectInfo)
- func AssertPathToContent(t *testing.T, readBucket storage.ReadBucket, walkPrefix string, ...)
- func AssertPaths(t *testing.T, readBucket storage.ReadBucket, walkPrefix string, ...)
- func RunTestSuite(t *testing.T, storagetestingDirPath string, ...)
- type GetExternalPathFunc
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func AssertNotExist ¶
func AssertNotExist( t *testing.T, readBucket storage.ReadBucket, path string, )
AssertNotExist asserts the path has the expected ObjectInfo.
func AssertObjectInfo ¶
func AssertObjectInfo( t *testing.T, readBucket storage.ReadBucket, path string, externalPath string, externalPathShouldEqualLocalPath bool, )
AssertObjectInfo asserts the path has the expected ObjectInfo.
func AssertObjectInfoEqual ¶
func AssertObjectInfoEqual( t *testing.T, expected storage.ObjectInfo, actual storage.ObjectInfo, )
AssertObjectInfoEqual asserts the two ObjectInfos are equal.
func AssertPathToContent ¶
func AssertPathToContent( t *testing.T, readBucket storage.ReadBucket, walkPrefix string, expectedPathToContent map[string]string, )
AssertPathToContent asserts the content.
func AssertPaths ¶
func AssertPaths( t *testing.T, readBucket storage.ReadBucket, walkPrefix string, expectedPaths ...string, )
AssertPaths asserts the paths.
func RunTestSuite ¶
func RunTestSuite( t *testing.T, storagetestingDirPath string, newReadBucket func(*testing.T, string, storageos.Provider) (storage.ReadBucket, GetExternalPathFunc), newWriteBucket func(*testing.T, storageos.Provider) storage.WriteBucket, writeBucketToReadBucket func(*testing.T, storage.WriteBucket) storage.ReadBucket, externalPathsShouldEqualLocalPaths bool, )
RunTestSuite runs the test suite.
storagetestingDirPath is the path to this directory. newReadBucket takes a path to a directory.
Types ¶
Click to show internal directories.
Click to hide internal directories.