testutils

package
v0.34.2 Latest Latest
Warning

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

Go to latest
Published: Sep 23, 2025 License: Apache-2.0 Imports: 29 Imported by: 0

Documentation

Overview

Package testutils provides utilities for use in tests

Index

Constants

This section is empty.

Variables

View Source
var (
	MaxResultLimit         = 10
	TrustCenterCnameTarget = "cname.test.net"
)

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(c *ent.Client, u *objects.Objects, opts ...openlaneclient.ClientOption) (*testclient.TestClient, error)

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

func TestRestClient added in v0.26.0

TestClient creates a new OpenlaneClient for testing

Types

This section is empty.

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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