Add integration tests#25
Merged
Merged
Conversation
6dbb175 to
12db325
Compare
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.
This pull request introduces a comprehensive integration test suite for the backend API, adds a GitHub Actions workflow for running integration tests in CI, and improves configuration flexibility for both Docker and test environments. The main themes are improved test coverage (especially for authentication, health, and CRUD operations), enhanced CI/CD automation, and better configuration management.
Integration and API Test Coverage:
integration_testdirectory. These tests cover both success and failure cases, including edge cases such as invalid input, cascading deletes, and authorization errors. [1] [2] [3] [4]CI/CD and Workflow Automation:
.github/workflows/integration_test.yml) to automatically build the backend Docker image, start a service container, and run the integration tests on every push. This ensures integration tests are run consistently in CI..github/workflows/unit_test.yml) to use Go 1.25 and to exclude integration tests from the unit test steps, keeping unit and integration tests separate.Configuration and Docker Improvements:
Dockerfileto use build arguments for the config file and port, allowing flexible builds for different environments (e.g., test vs. production). The correct config file and port are now set at build/run time, improving testability and deployment.config/config_test.yaml) so that the database schema path is correct when running inside Docker, improving reliability of integration tests.