Help us shape the future of Go! Take the 2026 Go Developer Survey

storetest

package
v0.45.0 Latest Latest
Warning

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

Go to latest
Published: Oct 30, 2026 License: Apache-2.0, Apache-2.0 Imports: 6 Imported by: 0

Documentation

Overview

Package storetest tests the public directory storage and lookup contracts. It does not require an HTTP server or knowledge of a backend's schema, resource ID format, revision encoding, or persistence mechanism.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Run

func Run(t *testing.T, open Factory)

Run exercises sequential provisioning, authorization projections, pagination and audit through public interfaces. It does not test or define transactionality, concurrent access, or propagation timing. Backend-specific consistency, durability and HTTP protocol checks belong in separate tests.

Types

type Backend

type Backend struct {
	directory.Directory
	directory.Store
}

Backend pairs the lookup and management views of one logical directory. The views may be implemented by different instances.

type Factory

type Factory func(t *testing.T) Backend

Factory returns a fresh, empty directory for each subtest. It initializes storage and registers any cleanup with t.Cleanup. The sequential examples expect a test fixture whose completed writes are readable; a backend with delayed visibility can supply a test view that waits for its own propagation. This test fixture assumption is not a consistency guarantee of Store.

Jump to

Keyboard shortcuts

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