mirror of
https://github.com/crawlab-team/crawlab.git
synced 2026-01-22 17:31:03 +01:00
feat: disable backend unit tests and document reasons for integration test requirements
This commit is contained in:
29
.github/workflows/docker-crawlab.yml
vendored
29
.github/workflows/docker-crawlab.yml
vendored
@@ -182,19 +182,22 @@ jobs:
|
||||
- name: Run tests
|
||||
working-directory: ${{ matrix.package }}
|
||||
run: |
|
||||
# Find all directories containing *_test.go files
|
||||
test_dirs=$(find . -name "*_test.go" -exec dirname {} \; | sort -u)
|
||||
# Run go test on each directory (excluding controllers - API tests to be reimplemented)
|
||||
for dir in $test_dirs
|
||||
do
|
||||
# Skip controllers directory (API/integration tests, not unit tests)
|
||||
if [[ "$dir" == *"/controllers"* ]]; then
|
||||
echo "Skipping API tests in $dir"
|
||||
continue
|
||||
fi
|
||||
echo "Running tests in $dir"
|
||||
go test ./$dir
|
||||
done
|
||||
echo "============================================================"
|
||||
echo "Backend unit tests disabled for package: ${{ matrix.package }}"
|
||||
echo "============================================================"
|
||||
echo ""
|
||||
echo "Reason: Existing Go tests are integration tests requiring"
|
||||
echo "infrastructure (MongoDB, gRPC servers), not true unit tests."
|
||||
echo ""
|
||||
echo "Use the proper integration test suite instead:"
|
||||
echo " cd tests/"
|
||||
echo " ./test-runner.py --list-specs"
|
||||
echo ""
|
||||
echo "For details, see:"
|
||||
echo " - BACKEND_TESTS_DISABLED.md (project root)"
|
||||
echo " - crawlab/core/BACKEND_TESTS_DISABLED.md"
|
||||
echo " - tests/TESTING_SOP.md"
|
||||
echo "============================================================"
|
||||
- name: Set output
|
||||
id: set_output
|
||||
if: failure()
|
||||
|
||||
Reference in New Issue
Block a user