storage

package
v0.2.1 Latest Latest
Warning

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

Go to latest
Published: Jul 6, 2026 License: Apache-2.0 Imports: 10 Imported by: ? modules, 0 packages

The first number is the count of modules that contain a package that imports this one. The module count is a better indicator of popularity than the package count. A module with 100 importing packages is counted only once instead of 100 times, reflecting the fact that the choice to use the package was likely made only once, not 100 times.
A '?' means that the value hasn't been computed yet.

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type StorageContractSuite

type StorageContractSuite struct {
	suite.Suite
	// contains filtered or unexported fields
}

StorageContractSuite defines the contract tests for the storage.Storage interface. All storage implementations must pass these tests. Implementation-specific tests should embed this suite and call SetStorage().

func (*StorageContractSuite) SetContext

func (s *StorageContractSuite) SetContext(ctx context.Context)

SetContext sets the context for tests

func (*StorageContractSuite) SetLogger

func (s *StorageContractSuite) SetLogger(log *testutil.TestLogger)

SetLogger sets the logger for tests

func (*StorageContractSuite) SetStorage

func (s *StorageContractSuite) SetStorage(store storage.Storage)

SetStorage is called by implementation tests to provide the concrete storage instance

func (*StorageContractSuite) TestStorage_ChangeCreateAndGet_Match

func (s *StorageContractSuite) TestStorage_ChangeCreateAndGet_Match()

TestStorage_ChangeCreateAndGet_Match verifies a created record is returned by GetByURI.

func (*StorageContractSuite) TestStorage_ChangeCreateAndGet_NoMatch

func (s *StorageContractSuite) TestStorage_ChangeCreateAndGet_NoMatch()

TestStorage_ChangeCreateAndGet_NoMatch verifies GetByURI returns empty for an unclaimed URI.

func (*StorageContractSuite) TestStorage_ChangeCreate_DifferentRequestSameURI

func (s *StorageContractSuite) TestStorage_ChangeCreate_DifferentRequestSameURI()

TestStorage_ChangeCreate_DifferentRequestSameURI verifies distinct requests on one URI coexist.

func (*StorageContractSuite) TestStorage_ChangeCreate_EmptyDetails

func (s *StorageContractSuite) TestStorage_ChangeCreate_EmptyDetails()

TestStorage_ChangeCreate_EmptyDetails verifies a zero-value Details round-trips (stored as a JSON object).

func (*StorageContractSuite) TestStorage_ChangeCreate_Idempotent

func (s *StorageContractSuite) TestStorage_ChangeCreate_Idempotent()

TestStorage_ChangeCreate_Idempotent verifies a repeated Create of the same PK is a no-op.

func (*StorageContractSuite) TestStorage_ChangeCreate_PreservesDetails

func (s *StorageContractSuite) TestStorage_ChangeCreate_PreservesDetails()

TestStorage_ChangeCreate_PreservesDetails verifies typed Details round-trip through the store.

func (*StorageContractSuite) TestStorage_ChangeGetByURI_DoesNotExcludeSelf

func (s *StorageContractSuite) TestStorage_ChangeGetByURI_DoesNotExcludeSelf()

TestStorage_ChangeGetByURI_DoesNotExcludeSelf verifies the store does not filter by request_id.

func (*StorageContractSuite) TestStorage_ChangeGetByURI_QueueScoped

func (s *StorageContractSuite) TestStorage_ChangeGetByURI_QueueScoped()

TestStorage_ChangeGetByURI_QueueScoped verifies GetByURI never returns rows from another queue.

func (*StorageContractSuite) TestStorage_CreateAndGet

func (s *StorageContractSuite) TestStorage_CreateAndGet()

TestStorage_CreateAndGet tests creating and retrieving a request

func (*StorageContractSuite) TestStorage_CreateAndGet_StackedPRs

func (s *StorageContractSuite) TestStorage_CreateAndGet_StackedPRs()

TestStorage_CreateAndGet_StackedPRs tests creating and retrieving a request with stacked PRs

func (*StorageContractSuite) TestStorage_CreateDuplicate

func (s *StorageContractSuite) TestStorage_CreateDuplicate()

TestStorage_CreateDuplicate tests creating a request with duplicate ID

func (*StorageContractSuite) TestStorage_NotFound

func (s *StorageContractSuite) TestStorage_NotFound()

TestStorage_NotFound tests getting a non-existent request

func (*StorageContractSuite) TestStorage_OptimisticLocking

func (s *StorageContractSuite) TestStorage_OptimisticLocking()

TestStorage_OptimisticLocking tests version-based optimistic locking

func (*StorageContractSuite) TestStorage_UpdateState

func (s *StorageContractSuite) TestStorage_UpdateState()

TestStorage_UpdateState tests updating request state

Jump to

Keyboard shortcuts

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