buf: github.com/bufbuild/buf/internal/pkg/storage/internal/storagetesting Index | Files

package storagetesting

import "github.com/bufbuild/buf/internal/pkg/storage/internal/storagetesting"

Package storagetesting implements testing utilities and integration tests for storage.

Index

Package Files

storagetesting.go

func AssertNotExist Uses

func AssertNotExist(
    t *testing.T,
    readBucket storage.ReadBucket,
    path string,
)

AssertNotExist asserts the path has the expected ObjectInfo.

func AssertObjectInfo Uses

func AssertObjectInfo(
    t *testing.T,
    readBucket storage.ReadBucket,
    size uint32,
    path string,
    externalPath string,
)

AssertObjectInfo asserts the path has the expected ObjectInfo.

func AssertObjectInfoEqual Uses

func AssertObjectInfoEqual(
    t *testing.T,
    expected storage.ObjectInfo,
    actual storage.ObjectInfo,
)

AssertObjectInfoEqual asserts the two ObjectInfos are equal.

func AssertPathToContent Uses

func AssertPathToContent(
    t *testing.T,
    readBucket storage.ReadBucket,
    walkPrefix string,
    expectedPathToContent map[string]string,
)

AssertPathToContent asserts the content.

func RunTestSuite Uses

func RunTestSuite(
    t *testing.T,
    storagetestingDirPath string,
    newReadBucket func(*testing.T, string) storage.ReadBucket,
    newWriteBucketAndCleanup func(*testing.T) (storage.WriteBucket, func() error),
    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.

Package storagetesting imports 13 packages (graph). Updated 2020-08-14. Refresh now. Tools for package owners.