Documentation
¶
Index ¶
- func CreateTestAccount(userID string, password *string) *account.Account
- func CreateTestConfig() *domain.Config
- func CreateTestConfigWithDatabase() *domain.Config
- func CreateTestSession() *session.Session
- func CreateTestUser() *user.User
- func RunTestMigrations(t *testing.T, repos *gorm.Repositories) error
- func SetupTestAuth(t *testing.T) (interface{}, func())
- func SetupTestSecondaryStorage(t *testing.T) (interface{}, func())
- type TestRepositories
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func CreateTestConfig ¶
func CreateTestConfigWithDatabase ¶
CreateTestConfigWithDatabase creates a test config with an in-memory SQLite database
func CreateTestSession ¶
func CreateTestUser ¶
func RunTestMigrations ¶
func RunTestMigrations(t *testing.T, repos *gorm.Repositories) error
RunTestMigrations runs migrations for testing using golang-migrate
func SetupTestAuth ¶
SetupTestAuth creates an auth instance with proper database setup and migrations
func SetupTestSecondaryStorage ¶
SetupTestSecondaryStorage creates a secondary storage instance with proper migrations for testing
Types ¶
type TestRepositories ¶
type TestRepositories struct {
UserRepo user.Repository
SessionRepo session.Repository
AccountRepo account.Repository
VerificationRepo verification.Repository
}
func SetupTestRepositories ¶
func SetupTestRepositories(t *testing.T) (*TestRepositories, func())
Click to show internal directories.
Click to hide internal directories.