bstest

package module
v0.0.6 Latest Latest
Warning

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

Go to latest
Published: Jun 8, 2022 License: Apache-2.0, MIT Imports: 12 Imported by: 0

README

go-bs-tests

A test suite for IPFS Blockstores.

See godocs for how to use.

License

Dual-licensed: MIT, Apache Software License v2, by way of the Permissive License Stack.

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Blockstore

type Blockstore interface {
	blockstore.Blockstore
	blockstore.Viewer
}

type Suite

type Suite struct {
	NewBlockstore  func(tb testing.TB) (bs Blockstore, path string)
	OpenBlockstore func(tb testing.TB, path string) (bs Blockstore, err error)
}

Suite represents a suite of tests. To run the tests, provide the NewBlockstore and OpenBlockstore functions for the blockstore under test. Then call RunTests().

func (*Suite) RunTests

func (s *Suite) RunTests(t *testing.T, prefix string)

func (*Suite) TestAllKeysRespectsContext

func (s *Suite) TestAllKeysRespectsContext(t *testing.T)

func (*Suite) TestAllKeysSimple

func (s *Suite) TestAllKeysSimple(t *testing.T)

func (*Suite) TestCidv0v1

func (s *Suite) TestCidv0v1(t *testing.T)

func (*Suite) TestDelete

func (s *Suite) TestDelete(t *testing.T)

func (*Suite) TestDoubleClose

func (s *Suite) TestDoubleClose(t *testing.T)

func (*Suite) TestGetAndViewWhenKeyIsNil

func (s *Suite) TestGetAndViewWhenKeyIsNil(t *testing.T)

func (*Suite) TestGetAndViewWhenKeyNotPresent

func (s *Suite) TestGetAndViewWhenKeyNotPresent(t *testing.T)

func (*Suite) TestHas

func (s *Suite) TestHas(t *testing.T)

func (*Suite) TestInsertExistingBlock

func (s *Suite) TestInsertExistingBlock(t *testing.T)

func (*Suite) TestPutMany

func (s *Suite) TestPutMany(t *testing.T)

func (*Suite) TestPutThenGetAndViewBlock

func (s *Suite) TestPutThenGetAndViewBlock(t *testing.T)

func (*Suite) TestPutThenGetSizeBlock

func (s *Suite) TestPutThenGetSizeBlock(t *testing.T)

func (*Suite) TestReopenPutGet

func (s *Suite) TestReopenPutGet(t *testing.T)

Jump to

Keyboard shortcuts

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