H-263 restore PostgreSQL E2E coverage (#41)
Co-authored-by: Rogee <rogee@ipao.vip>
This commit is contained in:
@@ -24,16 +24,13 @@ import (
|
||||
// Reference: Chatwoot's rack-cors configuration and middleware integration specs.
|
||||
type MiddlewareE2ETestSuite struct {
|
||||
suite.Suite
|
||||
server *httptest.Server
|
||||
router *gin.Engine
|
||||
jwtCfg *config.JWTConfig
|
||||
server *httptest.Server
|
||||
router *gin.Engine
|
||||
jwtCfg *config.JWTConfig
|
||||
}
|
||||
|
||||
// SetupSuite builds a minimal Gin router with CORS + Auth middleware and a health endpoint.
|
||||
func (s *MiddlewareE2ETestSuite) SetupSuite() {
|
||||
// E2E tests require PostgreSQL; skip in SQLite test mode.
|
||||
s.T().Skip("E2E tests require PostgreSQL; skipping in SQLite test mode")
|
||||
|
||||
s.jwtCfg = &config.JWTConfig{
|
||||
Secret: "middleware-e2e-test-secret",
|
||||
ExpiryHours: 1,
|
||||
@@ -72,7 +69,7 @@ func (s *MiddlewareE2ETestSuite) SetupSuite() {
|
||||
c.JSON(200, gin.H{
|
||||
"user_id": userID,
|
||||
"account_id": accountID,
|
||||
"role": role,
|
||||
"role": role,
|
||||
})
|
||||
})
|
||||
}
|
||||
@@ -544,4 +541,4 @@ func (s *MiddlewareE2ETestSuite) TestCORSAndAuth_DisallowedOriginBlocksEvenWithV
|
||||
|
||||
func TestMiddlewareE2ESuite(t *testing.T) {
|
||||
suite.Run(t, new(MiddlewareE2ETestSuite))
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user