Skip to content

Add integration tests#25

Merged
Mewbi merged 1 commit into
masterfrom
feat/integration_test
Jan 25, 2026
Merged

Add integration tests#25
Mewbi merged 1 commit into
masterfrom
feat/integration_test

Conversation

@Mewbi

@Mewbi Mewbi commented Jan 24, 2026

Copy link
Copy Markdown
Member

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:

  • Added new integration tests for authentication, health and limits endpoints, question and answer CRUD operations, and error handling in the integration_test directory. 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:

  • Added a new GitHub Actions workflow (.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.
  • Updated the unit test workflow (.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:

  • Enhanced the Dockerfile to 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.
  • Fixed the test config (config/config_test.yaml) so that the database schema path is correct when running inside Docker, improving reliability of integration tests.

@Mewbi Mewbi force-pushed the feat/integration_test branch from 6dbb175 to 12db325 Compare January 24, 2026 20:35
@Mewbi Mewbi merged commit 1f5b3be into master Jan 25, 2026
2 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant