test

package
v2.3.2 Latest Latest
Warning

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

Go to latest
Published: Aug 16, 2026 License: MIT Imports: 8 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 BucketFactory

type BucketFactory func() (model.CacheBucket, error)

BucketFactory creates a bucket for testing

type ClientFactory

type ClientFactory func() model.CacheClient

ClientFactory creates a cache client for testing

type TestData

type TestData struct {
	Value string `json:"value"`
}

TestData is a simple test data structure

type TestSuite

type TestSuite struct {
	Name          string
	BucketFactory BucketFactory
	ClientFactory ClientFactory
}

TestSuite runs a comprehensive test suite against any CacheClient implementation

func (*TestSuite) RunAll

func (s *TestSuite) RunAll(t *testing.T)

RunAll runs all tests in the suite

func (*TestSuite) TestBasicCRUD

func (s *TestSuite) TestBasicCRUD(t *testing.T)

TestBasicCRUD tests basic create, read, update, delete operations

func (*TestSuite) TestCollections

func (s *TestSuite) TestCollections(t *testing.T)

TestCollections tests collection operations

func (*TestSuite) TestConcurrency

func (s *TestSuite) TestConcurrency(t *testing.T)

TestConcurrency tests concurrent operations

func (*TestSuite) TestContextCancellation

func (s *TestSuite) TestContextCancellation(t *testing.T)

TestContextCancellation tests context cancellation handling

func (*TestSuite) TestErrorCases

func (s *TestSuite) TestErrorCases(t *testing.T)

TestErrorCases tests error handling for edge cases

func (*TestSuite) TestExpiration

func (s *TestSuite) TestExpiration(t *testing.T)

TestExpiration tests expiration functionality

func (*TestSuite) TestLabels

func (s *TestSuite) TestLabels(t *testing.T)

TestLabels tests label operations

func (*TestSuite) TestTimestamps

func (s *TestSuite) TestTimestamps(t *testing.T)

TestTimestamps tests timestamp operations and equal timestamp rejection

type TimelineTestSuite

type TimelineTestSuite struct {
	CreateTimeline func(name string) model.CacheTimeline
	Cleanup        func()
}

TimelineTestSuite defines behavioral tests for CacheTimeline implementations.

func (*TimelineTestSuite) RunAllTests

func (suite *TimelineTestSuite) RunAllTests(t *testing.T)

RunAllTests runs all timeline behavioral tests.

func (*TimelineTestSuite) TestAppendAndGetAt

func (suite *TimelineTestSuite) TestAppendAndGetAt(t *testing.T)

func (*TimelineTestSuite) TestContextCancellation

func (suite *TimelineTestSuite) TestContextCancellation(t *testing.T)

func (*TimelineTestSuite) TestFieldConflicts

func (suite *TimelineTestSuite) TestFieldConflicts(t *testing.T)

func (*TimelineTestSuite) TestGetAffectedRange

func (suite *TimelineTestSuite) TestGetAffectedRange(t *testing.T)

func (*TimelineTestSuite) TestGetExact

func (suite *TimelineTestSuite) TestGetExact(t *testing.T)

func (*TimelineTestSuite) TestGetLatest

func (suite *TimelineTestSuite) TestGetLatest(t *testing.T)

func (*TimelineTestSuite) TestGetRange

func (suite *TimelineTestSuite) TestGetRange(t *testing.T)

func (*TimelineTestSuite) TestGetUpdatedKeys

func (suite *TimelineTestSuite) TestGetUpdatedKeys(t *testing.T)

func (*TimelineTestSuite) TestGetUpdatedKeysEquivalence

func (suite *TimelineTestSuite) TestGetUpdatedKeysEquivalence(t *testing.T)

func (*TimelineTestSuite) TestManagementOperations

func (suite *TimelineTestSuite) TestManagementOperations(t *testing.T)

func (*TimelineTestSuite) TestRetentionPolicy

func (suite *TimelineTestSuite) TestRetentionPolicy(t *testing.T)

func (*TimelineTestSuite) TestSparseFieldUpdates

func (suite *TimelineTestSuite) TestSparseFieldUpdates(t *testing.T)

func (*TimelineTestSuite) TestTimeline

func (suite *TimelineTestSuite) TestTimeline(t *testing.T)

func (*TimelineTestSuite) TestTimestampNormalization

func (suite *TimelineTestSuite) TestTimestampNormalization(t *testing.T)

Jump to

Keyboard shortcuts

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