testutil

package
v0.0.0-...-7564820 Latest Latest
Warning

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

Go to latest
Published: Oct 7, 2024 License: GPL-3.0 Imports: 15 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func CheckEnv

func CheckEnv(key string) (string, string, bool)

func CheckTestDB

func CheckTestDB() (string, bool)

func CheckTestRedisClient

func CheckTestRedisClient() (string, bool)

func MustOpenTestDB

func MustOpenTestDB(t testing.TB) *sqlx.DB

func MustOpenTestRedisClient

func MustOpenTestRedisClient(t testing.TB) *redis.Client

func NewRecorder

func NewRecorder(path string, replaceUrl string) *recorder.Recorder

NewRecorder returns a configured recorder. It doesn't support absolute paths, so can't use testutil.RelPath() Must be relative to test directory, not project root.

func NewTestServer

func NewTestServer(baseDir string) *httptest.Server

Types

This section is empty.

Jump to

Keyboard shortcuts

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