Documentation ¶
Overview ¶
Package test provides tests and benchmarks that are usable by any store that implements store.Interface.
Index ¶
- func BenchMultihashGet(s indexer.Interface, b *testing.B)
- func BenchParallelMultihashGet(s indexer.Interface, b *testing.B)
- func BenchReadAll(s indexer.Interface, size string, t *testing.T)
- func E2ETest(t *testing.T, s indexer.Interface)
- func ParallelUpdateTest(t *testing.T, s indexer.Interface)
- func RandomMultihashes(n int) []multihash.Multihash
- func ReadCids(in io.Reader, out chan multihash.Multihash, done chan error)
- func RemoveProviderContextTest(t *testing.T, s indexer.Interface)
- func RemoveProviderTest(t *testing.T, s indexer.Interface)
- func RemoveTest(t *testing.T, s indexer.Interface)
- func SizeTest(t *testing.T, s indexer.Interface)
- func SkipStorage(t *testing.T)
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func BenchMultihashGet ¶
Benchmark single thread get operation
func BenchReadAll ¶
Benchmark the average time per get by all multihashes and the total storage used.
func ParallelUpdateTest ¶
func RandomMultihashes ¶
func RandomMultihashes(n int) []multihash.Multihash
RandomMultihashes generates the specified number of random cids.
func ReadCids ¶
ReadCids reads cids from an io.Reader and outputs their multihashes on a channel. Malformed cids are ignored.
func RemoveProviderTest ¶
func RemoveTest ¶
func SkipStorage ¶
Types ¶
This section is empty.
Click to show internal directories.
Click to hide internal directories.