test

package
v0.9.12 Latest Latest
Warning

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

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

Documentation

Index

Constants

This section is empty.

Variables

View Source
var GenericTestKeyPair = store.KeyItemPairRequest{
	Key: model.Key{
		Bucket: "world",
		ID:     "earth",
	},
	OwnableItem: store.OwnableItem{
		Item: model.Item{
			Data: map[string]interface{}{
				"year":  float64(1967),
				"words": []interface{}{"What", "a", "Wonderful", "World"},
			},
			TTL: &testInt,
		},
		Owner: "Louis Armstrong",
	},
}

Functions

func StoreTest

func StoreTest(s store.S, storeTiming time.Duration, t *testing.T)

StoreTest validates that a given store implementation works.

Types

type MockDB

type MockDB struct {
	mock.Mock
}

func (*MockDB) Close

func (s *MockDB) Close()

func (*MockDB) Delete

func (s *MockDB) Delete(key model.Key) (store.OwnableItem, error)

func (*MockDB) Get

func (s *MockDB) Get(key model.Key) (store.OwnableItem, error)

func (*MockDB) GetAll

func (s *MockDB) GetAll(bucket string) (map[string]store.OwnableItem, error)

func (*MockDB) Ping

func (s *MockDB) Ping() error

func (*MockDB) Push

func (s *MockDB) Push(key model.Key, item store.OwnableItem) error

Jump to

Keyboard shortcuts

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