testcases

package
v0.5.0 Latest Latest
Warning

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

Go to latest
Published: Oct 17, 2023 License: Apache-2.0 Imports: 9 Imported by: 0

Documentation

Overview

Package testcases implements common helpers for testing inverted and lsm indices.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func RunDuration

func RunDuration(t *testing.T, data map[int]posting.List, store SimpleStore)

RunDuration executes duration related cases.

func RunServiceName

func RunServiceName(t *testing.T, store SimpleStore)

RunServiceName executes service name related cases.

func SetUp

func SetUp(t *assert.Assertions, store SimpleStore)

SetUp initializes a index repository.

func SetUpDuration

func SetUpDuration(t *assert.Assertions, store index.Writer) map[int]posting.List

SetUpDuration initializes data for testing duration related cases.

Types

type SimpleStore

type SimpleStore interface {
	index.FieldIterable
	index.Writer
	MatchTerms(field index.Field) (list posting.List, err error)
}

SimpleStore is subset of index.Store for testing.

Jump to

Keyboard shortcuts

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