Develop tests#1
Merged
Merged
Conversation
- Replace `@RequiredArgsConstructor` with `@NoArgsConstructor` and `@AllArgsConstructor` in entity classes. - Provides a no-argument constructor for JPA compatibility and an all-argument constructor. Signed-off-by: Egg-03 <111327101+eggy03@users.noreply.github.com>
- Add `assertj-core` dependency (`3.27.7`) for fluent assertions in tests - Create `src/test/resources/application.properties` for test-specific configurations - Configure Quarkus dev services for PostgreSQL (`postgres:18.2-alpine`) and Redis (`redis:8.6.1-alpine`) in tests - Set up Hibernate ORM and Flyway for test database schema management - Explicitly set `rest-assured` dependency scope to `test` Signed-off-by: Egg-03 <111327101+eggy03@users.noreply.github.com>
…istration API - Add comprehensive integration tests for the `AuditLogRegistration` API. - Verify `POST`, `GET`, `PUT`, `DELETE` endpoints. - Cover success, conflict, not found, and bad request scenarios. - Validate input for null, malformed, and invalid parameters. Signed-off-by: Egg-03 <111327101+eggy03@users.noreply.github.com>
… registration - add comprehensive integration tests for the `MessageLogRegistration` API - verify `POST`, `GET`, `PUT`, and `DELETE` endpoints - cover success, conflict, not found, and bad request scenarios Signed-off-by: Egg-03 <111327101+eggy03@users.noreply.github.com>
- Add `@NoArgsConstructor` and `@AllArgsConstructor` to `MessageLogContentDTO`. - Add `@NoArgsConstructor` and `@AllArgsConstructor` to `MessageLogRegistrationDTO`. - Add `@NoArgsConstructor` and `@AllArgsConstructor` to `AuditLogRegistrationDTO`. - Provide explicit constructors for DTOs to improve object creation flexibility. Signed-off-by: Egg-03 <111327101+eggy03@users.noreply.github.com>
- Replace `jakarta.validation.constraints.NotNull` with `io.smallrye.common.constraint.NotNull` - Align `NotNull` annotation usage with SmallRye common constraints in API services Signed-off-by: Egg-03 <111327101+eggy03@users.noreply.github.com>
- Abstract message operations with `MessageLogContentOperation` interface. - Implement lock-enabled and lock-disabled versions. - Select implementation via `message.locks.enabled` build property. - Update controller and `application.properties` files. Signed-off-by: Egg-03 <111327101+eggy03@users.noreply.github.com>
…nt` API - add integration tests for `MessageLogContent` API endpoints - cover CRUD operations: create, read, update, delete - include tests for valid requests, existing/missing resources, and invalid input Signed-off-by: Egg-03 <111327101+eggy03@users.noreply.github.com>
- revert `log.info` to `log.debug` for lock acquisition and release messages which was changed temporarily to test whether the locking bean was selected correctly based on configuration. - update comment from `delegate health` to `service health` as this was a product of a mass refactor Signed-off-by: Egg-03 <111327101+eggy03@users.noreply.github.com>
- introduce `static final` constants for `messageId`, `messageContent`, and `authorId` values in `MessageLogContentTest.java` - replace hardcoded test data with the new constants for improved readability and maintainability - rename `saveMessage_exists_conflicts` test method to `saveMessage_alreadyExists_conflicts` - add assertion for negative `messageId` in `saveMessage_invalid_badRequest` test Signed-off-by: Egg-03 <111327101+eggy03@users.noreply.github.com>
- introduce parameterized tests for invalid DTO and path parameter validation - consolidate multiple individual validation tests into single parameterized tests - define constants for test data like `TEST_GUILD_ID` and `NEGATIVE_TEST_GUILD_ID` - separate deserialization failure tests from validation failure tests Signed-off-by: Egg-03 <111327101+eggy03@users.noreply.github.com>
- path/notALong would usually be checked for valid API paths, rather than a valid Long value. While conversion happens internally and exceptions are thrown, it is eventually wrapped in a NotFoundException by Quarkus, indicating that a resource path like that does not exist, meaning it checks for path validity before type validity, so it's mostly testing framework behavior at this point, which is why these tests have been removed. Signed-off-by: Egg-03 <111327101+eggy03@users.noreply.github.com>
- update `quarkus.log.level` from `DEBUG` to `INFO` in `src/test/resources/application.properties` - reduce verbosity in test environment logs Signed-off-by: Egg-03 <111327101+eggy03@users.noreply.github.com>
- Quarkus manages deploying db and redis containers during tests, which for some reason doesn't work while the tests are from within docker. It seems to require datasource, which Quarkus handles internally. Signed-off-by: Egg-03 <111327101+eggy03@users.noreply.github.com>
- update `quarkus.platform.version` from `3.31.3` to `3.31.4` Signed-off-by: Egg-03 <111327101+eggy03@users.noreply.github.com>
Signed-off-by: Egg-03 <111327101+eggy03@users.noreply.github.com>
- rely on quarkus devservices for deploying test database and redis, instead of using H2 for db - Set `quarkus.hibernate-orm.schema-management.strategy` to `validate`. - Change `quarkus.log.level` to `INFO`. Signed-off-by: Egg-03 <111327101+eggy03@users.noreply.github.com>
- Remove redundant `findByIdOptional` checks before deletion - Throw specific exceptions when delete operations fail, ensuring consistent error propagation Signed-off-by: Egg-03 <111327101+eggy03@users.noreply.github.com>
- rename integration test files from `*Test.java` to `*ServiceIntegrationTest.java` Signed-off-by: Egg-03 <111327101+eggy03@users.noreply.github.com>
Signed-off-by: Egg-03 <111327101+eggy03@users.noreply.github.com>
Signed-off-by: Egg-03 <111327101+eggy03@users.noreply.github.com>
Signed-off-by: Egg-03 <111327101+eggy03@users.noreply.github.com>
Signed-off-by: Egg-03 <111327101+eggy03@users.noreply.github.com>
- Rename `MessageContentException` and `GuildRegistrationException` to include "Failure" suffix. - Update corresponding exception mappers and service/test usages. Signed-off-by: Egg-03 <111327101+eggy03@users.noreply.github.com>
Signed-off-by: Egg-03 <111327101+eggy03@users.noreply.github.com>
- relocate the "Migration Guide" section to its own top-level heading - change migration guide admonition from `!IMPORTANT` to `!NOTE` Signed-off-by: Egg-03 <111327101+eggy03@users.noreply.github.com>
- update `quarkus.platform.version` from `3.31.4` to `3.32.1` - update project version from `1.0.0-SNAPSHOT` to `1.0.0` Signed-off-by: Egg-03 <111327101+eggy03@users.noreply.github.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
No description provided.