assertredis

package
v0.2.0 Latest Latest
Warning

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

Go to latest
Published: Jan 12, 2022 License: AGPL-3.0 Imports: 4 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Exists

func Exists(t *testing.T, rp *redis.Pool, key string, msgAndArgs ...interface{})

Exists asserts that the given key exists

func FlushDB

func FlushDB()

FlushDB flushes the test database

func Get

func Get(t *testing.T, rp *redis.Pool, key string, expected string, msgAndArgs ...interface{})

Get asserts that the given key contains the given string value

func HGetAll

func HGetAll(t *testing.T, rp *redis.Pool, key string, expected map[string]string, msgAndArgs ...interface{})

HGetAll asserts the result of calling HGETALL on the given key

func Keys

func Keys(t *testing.T, rp *redis.Pool, expected []string, msgAndArgs ...interface{})

Keys asserts that only the given keys exist

func NotExists

func NotExists(t *testing.T, rp *redis.Pool, key string, msgAndArgs ...interface{})

NotExists asserts that the given key does not exist

func SCard added in v0.2.0

func SCard(t *testing.T, rp *redis.Pool, key string, expected int, msgAndArgs ...interface{})

SCard asserts the result of calling SCard on the given key

func SMembers

func SMembers(t *testing.T, rp *redis.Pool, key string, expected []string, msgAndArgs ...interface{})

SMembers asserts the result of calling SMembers on the given key

func TestDB

func TestDB() *redis.Pool

TestDB returns a redis pool to our test database

func ZCard added in v0.2.0

func ZCard(t *testing.T, rp *redis.Pool, key string, expected int, msgAndArgs ...interface{})

ZCard asserts the result of calling ZCARD on the given key

func ZRange

func ZRange(t *testing.T, rp *redis.Pool, key string, min, max int, expected []string, msgAndArgs ...interface{})

ZRange asserts the result of calling ZRANGE on the given key

Types

This section is empty.

Jump to

Keyboard shortcuts

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