blobcachetests

package
v0.0.0-...-575026b Latest Latest
Warning

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

Go to latest
Published: Sep 30, 2025 License: GPL-3.0 Imports: 10 Imported by: 0

Documentation

Overview

package blobcachetests provides a test suite for blobcache.Service.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Abort

func Abort(t testing.TB, s blobcache.Service, txh blobcache.Handle)

func BasicNS

func BasicNS(t *testing.T, mk func(t testing.TB) blobcache.Service)

BasicNS tests that the BasicNS schema works on the Service.

func Commit

func Commit(t testing.TB, s blobcache.Service, txh blobcache.Handle)

func Delete

func Delete(t testing.TB, s blobcache.Service, txh blobcache.Handle, cid blobcache.CID)

func Exists

func Exists(t testing.TB, s blobcache.Service, txh blobcache.Handle, cid blobcache.CID) bool

func Get

func Get(t testing.TB, s blobcache.Service, txh blobcache.Handle, cid blobcache.CID, buf []byte, opts blobcache.GetOpts) int

func GetBytes

func GetBytes(t testing.TB, s blobcache.Service, txh blobcache.Handle, cid blobcache.CID, opts blobcache.GetOpts, maxSize int) []byte

func IsVisited

func IsVisited(t testing.TB, s blobcache.Service, txh blobcache.Handle, cids []blobcache.CID) []bool

func Load

func Load(t testing.TB, s blobcache.Service, txh blobcache.Handle) []byte

func Modify

func Modify(t testing.TB, s blobcache.Service, volh blobcache.Handle, f func(tx *blobcache.Tx) ([]byte, error))

func Post

func Save

func Save(t testing.TB, s blobcache.Service, txh blobcache.Handle, data []byte)

func SaveCommit

func SaveCommit(t testing.TB, s blobcache.Service, txh blobcache.Handle, data []byte)

SaveCommit is a convenience function that saves the given data and then commits the transaction.

func ServiceAPI

func ServiceAPI(t *testing.T, mk func(t testing.TB) blobcache.Service)

ServiceAPI tests an implementation of blobcache.Service.

func TestManyBlobs

func TestManyBlobs(t *testing.T, singleTx bool, mk func(t testing.TB) blobcache.Service)

func TestMultiNode

func TestMultiNode(t *testing.T, mk func(t testing.TB, n int) []blobcache.Service)

func TxAPI

func TxAPI(t *testing.T, mk func(t testing.TB) (blobcache.Service, blobcache.Handle))

TxAPI runs a test suite for transactions on a given volume. The function mk should return a service and a volume handle. The volume handle will be used to open multiple transactions, sometimes concurrently.

func Visit

func Visit(t testing.TB, s blobcache.Service, txh blobcache.Handle, cids []blobcache.CID)

Types

This section is empty.

Jump to

Keyboard shortcuts

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