test

package
v0.0.0-...-9cb517b Latest Latest
Warning

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

Go to latest
Published: Nov 27, 2022 License: MIT Imports: 7 Imported by: 0

Documentation

Overview

Package test contains functions used for testing in redistypes.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func AssertEqual

func AssertEqual(t *testing.T, want interface{}, got interface{})

AssertEqual checks if got, returned from redis, is equal to want, a string or an int. If not equal it will cause the test to fail.

func DeleteKey

func DeleteKey(name string, conn redis.Conn)

DeleteKey deletes name from Redis.

func IntsToInterfaceSlice

func IntsToInterfaceSlice(ints ...int) []interface{}

IntsToInterfaceSlice converts ints to a slice of interfaces containing the ints.

func RandomKey

func RandomKey() string

RandomKey returns a key of the form test:<number>, where <number> is a random number. It is used for testing Redis data types using random keys.

func StringsToInterfaceSlice

func StringsToInterfaceSlice(strings ...string) []interface{}

StringsToInterfaceSlice converts strings to a slice of interfaces containing the strings.

Types

This section is empty.

Jump to

Keyboard shortcuts

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