2025-03-29 15:11:25 -07:00
|
|
|
//go:build e2etest
|
|
|
|
|
|
|
|
|
|
package bootstrap
|
|
|
|
|
|
|
|
|
|
import (
|
|
|
|
|
"github.com/gin-gonic/gin"
|
|
|
|
|
"gorm.io/gorm"
|
|
|
|
|
|
|
|
|
|
"github.com/pocket-id/pocket-id/backend/internal/controller"
|
|
|
|
|
"github.com/pocket-id/pocket-id/backend/internal/service"
|
|
|
|
|
)
|
|
|
|
|
|
|
|
|
|
// When building for E2E tests, add the e2etest controller
|
|
|
|
|
func init() {
|
2025-05-03 14:25:22 -07:00
|
|
|
registerTestControllers = []func(apiGroup *gin.RouterGroup, db *gorm.DB, svc *services){
|
|
|
|
|
func(apiGroup *gin.RouterGroup, db *gorm.DB, svc *services) {
|
2025-05-07 09:38:02 -05:00
|
|
|
testService := service.NewTestService(db, svc.appConfigService, svc.jwtService, svc.ldapService)
|
2025-03-29 15:11:25 -07:00
|
|
|
controller.NewTestController(apiGroup, testService)
|
|
|
|
|
},
|
|
|
|
|
}
|
|
|
|
|
}
|