assertredis

package
v0.3.1 Latest Latest
Warning

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

Go to latest
Published: May 24, 2023 License: MIT 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 HLen added in v0.2.2

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

HLen asserts the result of calling HLEN 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 LLen added in v0.2.2

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

LLen asserts the result of calling LLEN on the given key

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 SIsMember added in v0.3.0

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

SIsMember asserts the result of calling SISMEMBER 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