testing

package
v2.2.1 Latest Latest
Warning

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

Go to latest
Published: Oct 2, 2026 License: AGPL-3.0 Imports: 18 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var EmptyFile embed.FS

EmptyFile is used for tests that require an embed.FS but don't need any files

Functions

func ParseID

func ParseID(id string) int

ParseID converts a string ID to an integer. In tests, we often get string IDs from API responses but need to convert them to integers for database operations.

func PerformAuthRequest

func PerformAuthRequest(r http.Handler, method, path string, body interface{}, token string) *httptest.ResponseRecorder

PerformAuthRequest performs an HTTP request with authentication token

func PerformRequest

func PerformRequest(r http.Handler, method, path string, body interface{}) *httptest.ResponseRecorder

func SetupTestAuthConfig

func SetupTestAuthConfig(db *gorm.DB, service *services.Service) *auth.Config

func SetupTestAuthService

func SetupTestAuthService(db *gorm.DB, service *services.Service) *auth.AuthService

func SetupTestDB

func SetupTestDB(t *testing.T) *gorm.DB

func SetupTestLicenser

func SetupTestLicenser() interface{}

SetupTestLicenser is deprecated - licensing has been removed This function is kept for backward compatibility but does nothing

func SetupTestNotificationService

func SetupTestNotificationService(db *gorm.DB) *services.NotificationService

func SetupTestService

func SetupTestService(db *gorm.DB) *services.Service

Types

This section is empty.

Jump to

Keyboard shortcuts

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