Documentation ¶
Overview ¶
Package testutils provides utilities for use in tests
Index ¶
- func CreateSessionManager() sessions.Store[map[string]any]
- func CreateTokenManager(refreshOverlap time.Duration) (*tokens.TokenManager, error)
- func MockObjectManager(t *testing.T, uploader objects.UploaderFunc) (*objects.Objects, error)
- func NewRedisClient() *redis.Client
- func TestClient(t *testing.T, c *ent.Client, u *objects.Objects, ...) (*openlaneclient.OpenlaneClient, error)
- func TestClientWithAuth(t *testing.T, c *ent.Client, u *objects.Objects, ...) (*openlaneclient.OpenlaneClient, error)
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func CreateSessionManager ¶
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
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
func TestClient(t *testing.T, c *ent.Client, u *objects.Objects, opts ...openlaneclient.ClientOption) (*openlaneclient.OpenlaneClient, error)
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.
Click to show internal directories.
Click to hide internal directories.