-
Notifications
You must be signed in to change notification settings - Fork 7
Expand file tree
/
Copy pathapplication-test.properties
More file actions
47 lines (39 loc) · 2.22 KB
/
Copy pathapplication-test.properties
File metadata and controls
47 lines (39 loc) · 2.22 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
# deny or allow
user.security.defaultAction=deny
# Used if default is allow
user.security.protectedURIs=/protected.html
# Used if default is deny
# The MFA challenge page must stay unprotected: MFA tests redirect partially-authenticated users to
# it, and a protected challenge page would redirect back to itself forever.
user.security.unprotectedURIs=/,/index.html,/css/*,/js/*,/img/*,/register.html,/user/registration,/user/resendRegistrationToken,/user/resetPassword,/user/login
user.security.loginPageURI=/login.html
# MFA stays off for the general suite; MFA tests opt in via @TestPropertySource
user.mfa.enabled=false
# Account lockout configuration
user.security.maxFailedLoginAttempts=3
user.security.lockoutDurationMinutes=30
# Audit configuration for testing
user.audit.logEvents=true
# H2 Database Configuration
spring.datasource.driver-class-name=org.h2.Driver
#spring.datasource.url=jdbc:h2:mem:db;DB_CLOSE_DELAY=-1;MODE=MariaDB;DATABASE_TO_LOWER=TRUE
# Per-context unique DB name (${random.uuid}) so each Spring context gets its own isolated in-memory
# database. The framework's 4.4.0 security work made registerNewUserAccount/loginAttempt mutations commit
# in their own transactions (NOT_SUPPORTED / @Transactional), so they survive a test's @Transactional
# rollback. With a single shared DB name those committed rows leaked across test classes and collided with
# other classes' deleteAll()/registration (UserAlreadyExist + FK_VERIFY_USER violations). The placeholder
# resolves once per context, so all connections within a context share one DB while distinct contexts stay
# isolated. Mirrors the library's own test isolation fix.
spring.datasource.url=jdbc:h2:mem:testdb-${random.uuid};DB_CLOSE_DELAY=-1;DB_CLOSE_ON_EXIT=FALSE
spring.datasource.username=sa
spring.datasource.password=sa
# JPA Configuration
spring.jpa.hibernate.ddl-auto=create-drop
spring.jpa.database-platform=org.hibernate.dialect.H2Dialect
spring.jpa.properties.hibernate.dialect=org.hibernate.dialect.H2Dialect
spring.jpa.properties.hibernate.dialect.storage_engine=none
logging.level.root=INFO
logging.level.org.springframework=DEBUG
#logging.level.org.springframework.data.repository=DEBUG
#logging.level.org.hibernate=DEBUG
#logging.level.org.springframework.orm.jpa=DEBUG