This commit is contained in:
@@ -0,0 +1,72 @@
|
||||
# ./gradlew test (Testcontainers: postgres:17.6-alpine3.22, redis:8.4.0-alpine)
|
||||
total: 56 tests, 0 failed
|
||||
|
||||
infrastructure.controllers.authentication.AuthenticationControllerTest: 9 tests, 0 failed, 7.771 s
|
||||
- logout revokes only the current token
|
||||
- Bearer token cannot open a session
|
||||
- password containing a colon and non-ASCII characters works
|
||||
- unknown token returns 401
|
||||
- session expires after SESSION_TTL_SECONDS
|
||||
- each login issues a different token
|
||||
- valid Basic credentials open a session
|
||||
- missing or malformed Basic header returns 401
|
||||
- wrong password and unknown user get the same 401
|
||||
infrastructure.controllers.chat.ChatControllerTest: 6 tests, 0 failed, 2.042 s
|
||||
- member can read own chat and members keep their order
|
||||
- unknown member is rejected before anything is written
|
||||
- foreign chat returns 404 for non-member
|
||||
- cursor issued to another user is rejected
|
||||
- chat list contains only own chats and is paginated
|
||||
- invalid member lists are rejected with 400
|
||||
infrastructure.controllers.health.HealthControllerTest: 2 tests, 0 failed, 0.128 s
|
||||
- live returns 200
|
||||
- ready returns 200 when database is reachable
|
||||
infrastructure.controllers.message.MessageConcurrencyTest: 1 tests, 0 failed, 0.281 s
|
||||
- parallel senders produce exactly N unique messages
|
||||
infrastructure.controllers.message.MessageControllerTest: 7 tests, 0 failed, 1.864 s
|
||||
- foreign chat returns 404 when sending
|
||||
- last page has null next_cursor
|
||||
- pagination walks all messages exactly once
|
||||
- foreign chat returns 404 when listing
|
||||
- empty text returns 400 invalid_request
|
||||
- history that is an exact multiple of limit ends with null next_cursor
|
||||
- foreign cursor returns 400
|
||||
infrastructure.controllers.user.UserControllerTest: 11 tests, 0 failed, 1.7 s
|
||||
- password shorter than 12 code points returns 400
|
||||
- concurrent registrations of one username create exactly one user
|
||||
- X-User-Id alone gives no access
|
||||
- create user returns 201 without password
|
||||
- duplicate username returns 409 conflict
|
||||
- missing token returns 401 with Bearer challenge
|
||||
- invalid JSON body returns 400 invalid_request
|
||||
- missing password returns 400
|
||||
- Basic credentials are rejected on business endpoints
|
||||
- me returns the session owner
|
||||
- X-User-Id does not override bearer identity
|
||||
infrastructure.repositories.authentication.session.cache.RedisSessionCacheRepositoryTest: 3 tests, 0 failed, 0.1 s
|
||||
- cached session round-trips and expires together with the session
|
||||
- revoke replaces a cached session with a tombstone
|
||||
- late cache fill cannot overwrite a tombstone
|
||||
infrastructure.repositories.chat.ExposedChatRepositoryTest: 2 tests, 0 failed, 0.529 s
|
||||
- chat row is rolled back when inserting members fails
|
||||
- successful creation commits the chat and every member
|
||||
infrastructure.services.authentication.SessionLookupSingleFlightTest: 4 tests, 0 failed, 1.107 s
|
||||
- request arriving after logout does not join a lookup started before it
|
||||
- without single-flight every concurrent miss queries the database
|
||||
- with single-flight concurrent misses share one database lookup
|
||||
- lookup that finished before a request arrived is not reused
|
||||
infrastructure.services.hashing.DefaultHashingServiceTest: 4 tests, 0 failed, 0.425 s
|
||||
- passwords differing only after 72 bytes are distinguished
|
||||
- validates the right password and rejects a wrong one
|
||||
- malformed hash is rejected instead of throwing
|
||||
- hash is a salted Argon2id PHC string
|
||||
plugins.DatabaseMigrationTest: 1 tests, 0 failed, 0.206 s
|
||||
- re-running migrations applies nothing and keeps data
|
||||
plugins.DependencyFailureTest: 3 tests, 0 failed, 8.502 s
|
||||
- without PostgreSQL requests fail with a bounded 503
|
||||
- without Redis requests bypass the cache
|
||||
- hanging Redis costs one command timeout and recovers
|
||||
plugins.SessionCacheTest: 3 tests, 0 failed, 0.963 s
|
||||
- emptied cache falls back to PostgreSQL
|
||||
- first authenticated request fills the cache
|
||||
- logout leaves a tombstone and the token is rejected
|
||||
Reference in New Issue
Block a user