testutils

package
v1.0.1 Latest Latest
Warning

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

Go to latest
Published: Jul 31, 2020 License: AGPL-3.0 Imports: 4 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var (
	// TestCases are key-values to use in datastore testing
	TestCases = map[string]string{
		"/a":     "a",
		"/a/b":   "ab",
		"/a/b/c": "abc",
		"/a/b/d": "a/b/d",
		"/a/c":   "ac",
		"/a/d":   "ad",
		"/e":     "e",
		"/f":     "f",
		"/g":     "",
	}
)

Functions

func AddTestCases

func AddTestCases(t *testing.T, d datastore.Datastore, testcases map[string]string)

AddTestCases stores the key-value pairs in a datastore for testing

func ExpectKeyFilterMatches

func ExpectKeyFilterMatches(t *testing.T, actual dsq.Results, expect []string)

ExpectKeyFilterMatches is used to verify filtering results

func ExpectKeyOrderMatches

func ExpectKeyOrderMatches(t *testing.T, actual dsq.Results, expect []string)

ExpectKeyOrderMatches is used to verify ordering results

func ExpectMatches

func ExpectMatches(t *testing.T, expect []string, actualR dsq.Results)

ExpectMatches is used to match expected results with actual results

Types

This section is empty.

Jump to

Keyboard shortcuts

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