testutils

package
v0.5.1 Latest Latest
Warning

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

Go to latest
Published: Dec 11, 2024 License: Apache-2.0 Imports: 25 Imported by: 0

Documentation

Overview

Package testutils provides utilities for use in tests

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func CreateSessionManager

func CreateSessionManager() sessions.Store[map[string]any]

CreateSessionManager creates a new session manager for testing

func CreateTokenManager

func CreateTokenManager(refreshOverlap time.Duration) (*tokens.TokenManager, error)

CreateTokenManager creates a new token manager for testing

func MockObjectManager added in v0.3.0

func MockObjectManager(t *testing.T, uploader objects.UploaderFunc) (*objects.Objects, error)

MockObjectManager creates a new objects manager for testing with a mock storage backend

func NewRedisClient

func NewRedisClient() *redis.Client

NewRedisClient creates a new redis client for testing using miniredis

func TestClient added in v0.1.2

TestClient creates a new OpenlaneClient for testing

func TestClientWithAuth added in v0.1.2

func TestClientWithAuth(t *testing.T, c *ent.Client, u *objects.Objects, opts ...openlaneclient.ClientOption) (*openlaneclient.OpenlaneClient, error)

TestClientWithAuth creates a new OpenlaneClient for testing that includes the auth middleware

Types

This section is empty.

Directories

Path Synopsis
login

Jump to

Keyboard shortcuts

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