Use docker container for integration test#443
Conversation
|
[APPROVALNOTIFIER] This PR is APPROVED This pull-request has been approved by: yhmo The full list of commands accepted by this bot can be found here. The pull request process is described here DetailsNeeds approval from an approver in each of these files:
Approvers can indicate their approval by writing |
There was a problem hiding this comment.
Pull request overview
This pull request introduces Testcontainers-based integration testing infrastructure to enable automated testing against a real Milvus instance. The changes replace manual server setup with containerized testing that automatically manages the Milvus container lifecycle.
Changes:
- Added Python-based testcontainers management script for starting/stopping Milvus containers
- Introduced C++ Google Test environment to manage container lifecycle across all integration tests
- Refactored test assertions to use a new
ExpectStatusOKhelper for better error reporting - Updated CI workflows to include integration testing and removed lint exclusion for test directory
- Removed tests requiring special server configurations (auth and TLS)
Reviewed changes
Copilot reviewed 14 out of 14 changed files in this pull request and generated 15 comments.
Show a summary per file
| File | Description |
|---|---|
| test/st/milvus_container.py | New Python script to manage Milvus container lifecycle using testcontainers-python |
| test/st/MilvusContainerEnv.h | New C++ Google Test environment that orchestrates container start/stop around test runs |
| test/st/Main.cpp | Updated to register the MilvusContainerEnv global test environment |
| test/st/MilvusServerTest.h | Added ExpectStatusOK helper and connection status logging |
| test/st/MilvusServerTest.cpp | Implemented ExpectStatusOK helper with diagnostic output |
| test/st/TestSearch.cpp | Migrated from EXPECT_TRUE to ExpectStatusOK, fixed collection name initialization |
| test/st/TestSearchWithBinaryVectors.cpp | Migrated from EXPECT_TRUE to ExpectStatusOK, fixed collection name initialization |
| test/st/TestGeneric.cpp | Migrated from EXPECT_TRUE to ExpectStatusOK, added version logging |
| test/st/TestCollection.cpp | Migrated from EXPECT_TRUE to ExpectStatusOK |
| test/st/TestConnectWithUser.cpp | Removed (auth testing requires special server setup) |
| test/st/TestConnectWithTls.cpp | Removed (TLS testing requires special server setup) |
| scripts/install_deps.sh | Added testcontainers and docker Python packages to Ubuntu and Fedora dependency installation |
| scripts/lint_exclusions.txt | Removed test directory exclusion to enable linting of test code |
| .github/workflows/main.yaml | Added integration testing step to CI pipeline |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
Codecov Report❌ Patch coverage is Additional details and impacted files@@ Coverage Diff @@
## master #443 +/- ##
==========================================
- Coverage 53.47% 46.05% -7.42%
==========================================
Files 52 236 +184
Lines 4432 12382 +7950
Branches 0 1241 +1241
==========================================
+ Hits 2370 5703 +3333
- Misses 2062 6585 +4523
- Partials 0 94 +94
🚀 New features to boost your workflow:
|
97a2d3c to
5b5576f
Compare
1f06ceb to
103e3c3
Compare
f024ba4 to
70937a7
Compare
72aed58 to
c46e647
Compare
e4bd80f to
de1c41a
Compare
Signed-off-by: yhmo <yihua.mo@zilliz.com>
No description provided.