storage

package
v0.3.0-20260727164855-... Latest Latest
Warning

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

Go to latest
Published: Jul 27, 2026 License: Apache-2.0 Imports: 10 Imported by: 0

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_BuildCreateAndGet

func (s *StorageContractSuite) TestStorage_BuildCreateAndGet()

TestStorage_BuildCreateAndGet verifies a build round-trips through the store: ID is the runner-minted build identifier, and Get by ID finds the build with every field intact.

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_RequestQueueSummaryListAndCursor

func (s *StorageContractSuite) TestStorage_RequestQueueSummaryListAndCursor()

func (*StorageContractSuite) TestStorage_RequestSummaryCreateGetAndCAS

func (s *StorageContractSuite) TestStorage_RequestSummaryCreateGetAndCAS()

func (*StorageContractSuite) TestStorage_RequestURIListIsBoundedAndOrdered

func (s *StorageContractSuite) TestStorage_RequestURIListIsBoundedAndOrdered()

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