feat: add unit and integration tests for rental management domain
- Introduced RentPaymentCorrectionTest and RentPaymentTest to validate payment and refund logic. - Added PhoneNumberTest to ensure proper normalization of phone numbers. - Created TenantTest to verify attachment management and tenant referencing. - Implemented ReplacementRentalApiJourneyIT for end-to-end testing of rental and payment workflows. - Documented architectural decisions in ADR-0014, emphasizing strict DDD boundaries and transaction management.
This commit is contained in:
1 parent
6ce0719a20
commit
e02ad54bcb
263 files changed
+10847
-7183
No files matched your search
+25
-5
@@ -2,6 +2,16 @@ services:
|
||||
mongodb:
|
||||
image: mongo:8.0
|
||||
container_name: lmnp-mongodb
|
||||
entrypoint:
|
||||
- /bin/bash
|
||||
- -c
|
||||
- |
|
||||
if [ ! -s /data/configdb/keyfile ]; then
|
||||
umask 077
|
||||
openssl rand -base64 756 > /data/configdb/keyfile
|
||||
fi
|
||||
chmod 400 /data/configdb/keyfile
|
||||
exec docker-entrypoint.sh mongod --replSet rs0 --keyFile /data/configdb/keyfile --bind_ip_all
|
||||
ports:
|
||||
- "27017:27017"
|
||||
environment:
|
||||
@@ -9,12 +19,21 @@ services:
|
||||
MONGO_INITDB_ROOT_PASSWORD: adminpassword
|
||||
volumes:
|
||||
- mongodb_data:/data/db
|
||||
- mongodb_config:/data/configdb
|
||||
healthcheck:
|
||||
test: ["CMD", "mongosh", "--username", "admin", "--password", "adminpassword", "--eval", "db.adminCommand('ping')"]
|
||||
test:
|
||||
- CMD-SHELL
|
||||
- >-
|
||||
mongosh --quiet --host localhost
|
||||
--username "$${MONGO_INITDB_ROOT_USERNAME}"
|
||||
--password "$${MONGO_INITDB_ROOT_PASSWORD}"
|
||||
--authenticationDatabase admin
|
||||
--eval 'try { rs.status() } catch (error) { rs.initiate({_id: "rs0", members: [{_id: 0, host: "mongodb:27017"}]}) }; db.hello().isWritablePrimary'
|
||||
| grep -q true
|
||||
interval: 5s
|
||||
timeout: 5s
|
||||
retries: 5
|
||||
# - ./mongo-init.js:/docker-entrypoint-initdb.d/mongo-init.js:ro
|
||||
timeout: 10s
|
||||
retries: 10
|
||||
start_period: 20s
|
||||
|
||||
backend:
|
||||
build:
|
||||
@@ -24,7 +43,7 @@ services:
|
||||
ports:
|
||||
- "8080:8080"
|
||||
environment:
|
||||
SPRING_DATA_MONGODB_URI: mongodb://admin:adminpassword@mongodb:27017/lmnp?authSource=admin
|
||||
SPRING_DATA_MONGODB_URI: mongodb://admin:adminpassword@mongodb:27017/lmnp?authSource=admin&replicaSet=rs0&directConnection=true
|
||||
OIDC_ISSUER_URI: ${OIDC_ISSUER_URI:-http://localhost:8090/realms/voidAuth}
|
||||
OIDC_CLIENT_ID: ${OIDC_CLIENT_ID:-lmnp-client}
|
||||
OIDC_CLIENT_SECRET: ${OIDC_CLIENT_SECRET:-lmnp-secret}
|
||||
@@ -47,6 +66,7 @@ services:
|
||||
|
||||
volumes:
|
||||
mongodb_data:
|
||||
mongodb_config:
|
||||
attachment_data:
|
||||
|
||||
networks:
|
||||
|
||||
Reference in new issue
Block a user