castest

package
v0.0.0-...-c340b27 Latest Latest
Warning

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

Go to latest
Published: Sep 24, 2020 License: BSD-3-Clause Imports: 8 Imported by: 0

Documentation

Overview

Package castest provides common test cases for testing the behaviour of storage drivers.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Cases

func Cases() []cas.ID

Cases returns a slice with all of the IDs used when initializing a storage driver.

func TestCreate

func TestCreate(t *testing.T, storage cas.Storage)

TestCreate tests that the methods Create and Open respect the invariants for the Storage interface.

func TestIndex

func TestIndex(t *testing.T, storage cas.Storage)

TestIndex tests that the method Index respects the invariants for the Indexer interface. Obviously, the storage passed must also respect the Indexer interface.

func TestIndexCancel

func TestIndexCancel(t *testing.T, storage cas.Storage)

TestIndexCancel tests that the method Index respects the invariants for the Indexer interface. This tests cancels the indexing operation after half of the IDs have been processed. Obviously, the storage passed must also respect the Indexer interface.

func TestRemove

func TestRemove(t *testing.T, storage cas.Storage)

TestRemove tests that the method Remove respects the invariants for the Remover interface. Obviously, the storage passed must also respect the Remover interface.

Types

This section is empty.

Jump to

Keyboard shortcuts

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