storetest

package
v0.20.0 Latest Latest
Warning

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

Go to latest
Published: Sep 12, 2026 License: Apache-2.0 Imports: 5 Imported by: 0

Documentation

Overview

Package storetest provides reusable conformance checks for history stores.

Example
package main

import (
	"fmt"

	"github.com/Tangerg/scope/core/history/storetest"
)

func main() {
	capabilities := storetest.Capabilities{Reader: true, Writer: true}
	fmt.Println(capabilities.Reader, capabilities.Writer)
}
Output:
true true

Index

Examples

Constants

This section is empty.

Variables

This section is empty.

Functions

func Run

func Run(t *testing.T, store any, want Capabilities)

Run verifies a store's exact capability set and the validation that must complete before external I/O. Pass a non-nil zero-value *Store; the calls below must not reach provider dependencies.

Types

type Capabilities

type Capabilities struct {
	Reader  bool
	Writer  bool
	Clearer bool
	Lister  bool
}

Capabilities is the exact history interface set a store promises. False means the store must not accidentally satisfy that capability.

Jump to

Keyboard shortcuts

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