blobtest

package
v0.9.0 Latest Latest
Warning

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

Go to latest
Published: Nov 15, 2026 License: MIT Imports: 11 Imported by: 0

Documentation

Overview

Package blobtest provides a shared Ginkgo behavior suite every blob.Store implementation must pass. An implementation registers it from its own test suite:

var _ = blobtest.Conformance("fs", func(now func() time.Time) blob.Store {
	s, err := fsstore.Open(GinkgoT().TempDir(), fsstore.WithClock(now))
	Expect(err).NotTo(HaveOccurred())
	return s
})

A Store that several processes or handles can share also registers Shared, which runs the race specs across two handles on the same backing store.

The suite stores blobs of up to three chunks, so one run writes several hundred MiB through the Store.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Conformance

func Conformance(name string, open func(now func() time.Time) blob.Store) bool

Conformance registers the blob.Store behavior specs. open is called once per spec and must return a fresh, empty Store that reads the time only from now; the suite moves now forward to check CommittedAt and StartedAt. The suite closes the Store after the spec.

func Shared

func Shared(name string, open func(now func() time.Time) (a, b blob.Store, closeBoth func())) bool

Shared registers the race specs across two handles on one backing store, such as two processes that open the same directory. open is called once per spec and returns two handles on a fresh, empty store and a func that closes both.

Types

This section is empty.

Jump to

Keyboard shortcuts

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