Files
mev-beta/orig/scripts/test-suite.sh
Administrator c54c569f30 refactor: move all remaining files to orig/ directory
Completed clean root directory structure:
- Root now contains only: .git, .env, docs/, orig/
- Moved all remaining files and directories to orig/:
  - Config files (.claude, .dockerignore, .drone.yml, etc.)
  - All .env variants (except active .env)
  - Git config (.gitconfig, .github, .gitignore, etc.)
  - Tool configs (.golangci.yml, .revive.toml, etc.)
  - Documentation (*.md files, @prompts)
  - Build files (Dockerfiles, Makefile, go.mod, go.sum)
  - Docker compose files
  - All source directories (scripts, tests, tools, etc.)
  - Runtime directories (logs, monitoring, reports)
  - Dependency files (node_modules, lib, cache)
  - Special files (--delete)

- Removed empty runtime directories (bin/, data/)

V2 structure is now clean:
- docs/planning/ - V2 planning documents
- orig/ - Complete V1 codebase preserved
- .env - Active environment config (not in git)

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude <noreply@anthropic.com>
2025-11-10 10:53:05 +01:00

93 lines
2.2 KiB
Bash
Executable File
Raw Blame History

This file contains invisible Unicode characters
This file contains invisible Unicode characters that are indistinguishable to humans but may be processed differently by a computer. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.
This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.
#!/bin/bash
# This script runs comprehensive automated tests
set -e
echo "Starting comprehensive automated tests..."
# Initialize exit code
exit_code=0
# Run unit tests
echo "Running unit tests..."
if ! go test -v ./... -timeout=30s; then
echo "❌ Unit tests failed"
exit_code=1
else
echo "✅ Unit tests passed"
fi
# Run tests with race detection
echo "Running race condition tests..."
if ! go test -race -v ./... -timeout=60s; then
echo "❌ Race condition tests failed"
exit_code=1
else
echo "✅ Race condition tests passed"
fi
# Run coverage test
echo "Running coverage tests..."
if ! go test -v -coverprofile=coverage.out ./... -timeout=30s; then
echo "❌ Coverage tests failed"
exit_code=1
else
echo "✅ Coverage tests passed"
# Show coverage summary
go tool cover -func=coverage.out | tail -n 1
fi
# Run benchmarks (to make sure they don't panic)
echo "Running benchmarks..."
if ! go test -bench=. -run=^$ ./...; then
echo "❌ Benchmarks failed"
exit_code=1
else
echo "✅ Benchmarks passed"
fi
# Run integration tests (if they exist)
echo "Running integration tests..."
if [ -n "$(find . -name "*_integration_test.go" -print -quit)" ]; then
if ! go test -tags=integration -v ./... -timeout=60s; then
echo "❌ Integration tests failed"
exit_code=1
else
echo "✅ Integration tests passed"
fi
else
echo " No integration tests found"
fi
# Run property-based tests (if they exist)
echo "Running property-based tests..."
if [ -n "$(find . -name "*_property_test.go" -print -quit)" ]; then
if ! go test -tags=property -v ./... -timeout=60s; then
echo "❌ Property-based tests failed"
exit_code=1
else
echo "✅ Property-based tests passed"
fi
else
echo " No property-based tests found"
fi
# Run fuzz tests (if they exist)
echo "Running fuzz tests..."
if [ -n "$(find . -name "*_fuzz_test.go" -print -quit)" ]; then
# Run a quick fuzz test to ensure they work
go test -fuzz=Fuzz -fuzztime=10s ./pkg/math/ 2>/dev/null || echo "No fuzz tests found in math package"
else
echo " No fuzz tests found"
fi
echo "Comprehensive automated tests completed."
if [ $exit_code -ne 0 ]; then
echo "❌ Some tests failed"
exit $exit_code
else
echo "✅ All tests passed"
exit 0
fi