storagetesting

package
v0.24.0 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Sep 21, 2020 License: Apache-2.0 Imports: 12 Imported by: 0

Documentation

Overview

Package storagetesting implements testing utilities and integration tests for storage.

Index

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,
	size uint32,
	path string,
	externalPath string,
)

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 RunTestSuite

func RunTestSuite(
	t *testing.T,
	storagetestingDirPath string,
	newReadBucket func(*testing.T, string) storage.ReadBucket,
	newWriteBucket func(*testing.T) storage.WriteBucket,
	writeBucketToReadBucket func(*testing.T, storage.WriteBucket) storage.ReadBucket,
)

RunTestSuite runs the test suite.

storagetestingDirPath is the path to this directory. newReadBucket takes a path to a directory.

Types

This section is empty.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL