feat: Implemented the test cases workflow for Pull Requests #36
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 overhaul of the testing infrastructure for database connectors, focusing on improved reliability, realistic test environments, and better configuration management. The changes include new Docker Compose and GitHub Actions workflows for spinning up real PostgreSQL, MySQL, and MariaDB services, standardized test data seeding, and updates to test cases to use environment-driven configuration.
Testing Infrastructure Improvements
.github/workflows/test.ymlto automate tests with real PostgreSQL, MySQL, and MariaDB services using GitHub Actions, including service health checks and database seeding steps.bridge/docker-compose.test.ymlto allow local testing with Docker containers for all supported databases, including health checks and automatic seeding.Database Seeding
bridge/scripts/seed-test-db.sql), MySQL (bridge/scripts/seed-mysql.sql), and MariaDB (bridge/scripts/seed-mariadb.sql) to ensure consistent tables and sample data for integration tests. [1] [2] [3]Test Configuration and Reliability
bridge/__tests__/connectors/mysql.test.tsandbridge/__tests__/connectors/mariadb.test.tsto use environment variables for database names and SSL settings, improving flexibility and accuracy. [1] [2] [3] [4] [5]Environment Management
bridge/jest.env.jsto load environment variables from.envinstead of.env.testto align with new configuration practices.