- Introduced a new `.env.test.example` file for integration test configuration. - Added a `Makefile` to streamline test commands for unit and integration tests. - Implemented an integration testing harness with support for PostgreSQL, MinIO, and Redis using testcontainers. - Created a suite of integration tests covering health checks and user management functionalities. - Enhanced CI workflow to include integration tests with necessary environment variables.
23 lines
756 B
Go
23 lines
756 B
Go
package server
|
|
|
|
import (
|
|
"github.com/jackc/pgx/v5/pgxpool"
|
|
"github.com/redis/go-redis/v9"
|
|
|
|
"github.com/ultisuite/ulti-backend/internal/auth"
|
|
)
|
|
|
|
// Options tune server bootstrap for production vs integration tests.
|
|
type Options struct {
|
|
// WithoutWorkers skips IMAP sync and SMTP outbox background goroutines.
|
|
WithoutWorkers bool
|
|
// SkipAuthentikProvisioner disables Authentik suite app provisioning.
|
|
SkipAuthentikProvisioner bool
|
|
// VerifierHolder overrides OIDC verifier setup (integration tests inject a test issuer).
|
|
VerifierHolder *auth.Holder
|
|
// Pool overrides database pool creation (integration tests may pre-connect).
|
|
Pool *pgxpool.Pool
|
|
// Redis overrides KeyDB client creation (integration tests use miniredis).
|
|
Redis *redis.Client
|
|
}
|