testutils

package
v0.0.0-...-7570391 Latest Latest
Warning

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

Go to latest
Published: Mar 14, 2023 License: Apache-2.0 Imports: 15 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var (
	HelloWorld   = []byte("Hello, world")
	HogeFugaPiyo = []byte("hogefugapiyo")
)
View Source
var (
	Key = []byte("0123456789abcdef0123456789abcdef")
)
View Source
var ObservedFatalLog bool

Functions

func AssertBlobVersion

func AssertBlobVersion(bs blobstore.BlobStore, blobpath string, expected version.Version) error

func AssertBlobVersionRA

func AssertBlobVersionRA(bs blobstore.RandomAccessBlobStore, blobpath string, expected version.Version) error

func EnsureLogger

func EnsureLogger()

func TestCipher

func TestCipher() *btncrypt.Cipher

func TestFileBlobStore

func TestFileBlobStore() *blobstore.FileBlobStore

func TestFileBlobStoreOfName

func TestFileBlobStoreOfName(name string) *blobstore.FileBlobStore

func TestFileSystem

func TestFileSystem() *filesystem.FileSystem

func TestINodeDB

func TestINodeDB() inodedb.DBHandler

func TestQueryVersion

func TestQueryVersion(r io.Reader) (version.Version, error)

func WriteVersionedBlob

func WriteVersionedBlob(bs blobstore.BlobStore, blobpath string, version byte) error

func WriteVersionedBlobRA

func WriteVersionedBlobRA(bs blobstore.RandomAccessBlobStore, blobpath string, version byte) error

Types

type RWInterceptBlobStore

type RWInterceptBlobStore struct {
	BE         blobstore.BlobStore
	WrapWriter func(orig io.WriteCloser) (io.WriteCloser, error)
	WrapReader func(orig io.ReadCloser) (io.ReadCloser, error)
}

func (RWInterceptBlobStore) BlobSize

func (bs RWInterceptBlobStore) BlobSize(blobpath string) (int64, error)

func (RWInterceptBlobStore) ListBlobs

func (bs RWInterceptBlobStore) ListBlobs() ([]string, error)

func (RWInterceptBlobStore) OpenReader

func (bs RWInterceptBlobStore) OpenReader(blobpath string) (io.ReadCloser, error)

func (RWInterceptBlobStore) OpenWriter

func (bs RWInterceptBlobStore) OpenWriter(blobpath string) (io.WriteCloser, error)

type TestBlobHandle

type TestBlobHandle struct {
	Buf []byte
}

func (TestBlobHandle) Close

func (TestBlobHandle) Close() error

func (*TestBlobHandle) PRead

func (bh *TestBlobHandle) PRead(p []byte, offset int64) error

func (*TestBlobHandle) PWrite

func (bh *TestBlobHandle) PWrite(p []byte, offset int64) error

func (*TestBlobHandle) Size

func (bh *TestBlobHandle) Size() int64

func (*TestBlobHandle) Truncate

func (bh *TestBlobHandle) Truncate(size int64) error

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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