2026-03-27 18:12:56 +08:00
|
|
|
#!/bin/bash
|
|
|
|
|
set -e
|
|
|
|
|
|
|
|
|
|
PACKAGES=(
|
|
|
|
|
"./internal/admin/..."
|
|
|
|
|
# "./internal/binding/..."
|
|
|
|
|
"./internal/cache/..."
|
|
|
|
|
"./internal/cli/..."
|
|
|
|
|
"./internal/common/..."
|
|
|
|
|
"./internal/dao/..."
|
|
|
|
|
"./internal/engine/..."
|
2026-06-10 20:38:43 +08:00
|
|
|
"./internal/entity/..."
|
2026-03-27 18:12:56 +08:00
|
|
|
"./internal/handler/..."
|
2026-06-10 20:38:43 +08:00
|
|
|
"./internal/ingestion/..."
|
2026-03-27 18:12:56 +08:00
|
|
|
"./internal/router/..."
|
|
|
|
|
"./internal/server/..."
|
2026-06-10 20:38:43 +08:00
|
|
|
"./internal/service/..."
|
2026-03-27 18:12:56 +08:00
|
|
|
"./internal/storage/..."
|
|
|
|
|
"./internal/tokenizer/..."
|
2026-06-10 20:38:43 +08:00
|
|
|
"./internal/utility/..."
|
2026-03-27 18:12:56 +08:00
|
|
|
)
|
|
|
|
|
|
|
|
|
|
echo "Running tests for specific packages..."
|
|
|
|
|
for pkg in "${PACKAGES[@]}"; do
|
|
|
|
|
echo "=== Testing $pkg ==="
|
|
|
|
|
go test $pkg -v -cover -test.v
|
|
|
|
|
echo ""
|
|
|
|
|
done
|
|
|
|
|
|
|
|
|
|
#echo "Running all tests except failed packages..."
|
|
|
|
|
#go test $(go list ./internal/... | grep -v -E '(cli|service|binding)$') -v
|