testing

package
v2.3.0 Latest Latest
Warning

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

Go to latest
Published: Nov 29, 2026 License: AGPL-3.0 Imports: 18 Imported by: ? modules, 0 packages

The first number is the count of modules that contain a package that imports this one. The module count is a better indicator of popularity than the package count. A module with 100 importing packages is counted only once instead of 100 times, reflecting the fact that the choice to use the package was likely made only once, not 100 times.
A '?' means that the value hasn't been computed yet.

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