grabbit 95353ae2d7 chore: clean up project structure
- Remove .bmad-core/ and web-bundles/ (AI tool configs)
- Remove tmp-home/ directories and cache files
- Move test scripts to scripts/ directory
- Move design file to docs/ directory
- Remove duplicate AGENTS.md (content in CLAUDE.md)
- Remove duplicate sample-app-config.toml
- Update .gitignore with missing entries
- Fix hardcoded credentials in check-migrations.js
- Update IMPLEMENTATION_SUMMARY.md date

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

Co-Authored-By: Claude Sonnet 4.5 <noreply@anthropic.com>
2025-12-20 00:08:01 +08:00

52 lines
1.5 KiB
Bash
Executable File

#!/bin/bash
# 集成测试环境初始化脚本
set -e
echo "🚀 初始化集成测试环境..."
# 创建测试数据目录
mkdir -p test-data/localstack
mkdir -p test-data/uploads
mkdir -p test-data/fixtures
# 启动测试环境
echo "📦 启动Docker测试环境..."
docker-compose -f docker-compose.test.yml up -d
# 等待服务就绪
echo "⏳ 等待服务启动..."
sleep 10
# 检查服务健康状态
echo "🔍 检查服务状态..."
docker-compose -f docker-compose.test.yml ps
# 初始化LocalStack AWS服务
echo "🌟 初始化LocalStack AWS服务..."
aws --endpoint-url=http://localhost:4566 s3 mb s3://meteor-test-bucket --region us-east-1
aws --endpoint-url=http://localhost:4566 sqs create-queue --queue-name meteor-processing-queue --region us-east-1
# 运行数据库迁移
echo "📊 运行数据库迁移..."
docker-compose -f docker-compose.test.yml exec test-backend npm run migrate:up
# 创建测试用户和设备数据
echo "👤 创建测试数据..."
node test-data/seed-test-data.js
echo "✅ 集成测试环境初始化完成!"
echo ""
echo "🔗 服务地址:"
echo " - Frontend: http://localhost:3001"
echo " - Backend: http://localhost:3000"
echo " - LocalStack: http://localhost:4566"
echo " - PostgreSQL: localhost:5433"
echo ""
echo "🧪 运行测试命令:"
echo " - 后端集成测试: npm run test:integration"
echo " - 前端E2E测试: npm run test:e2e"
echo " - 全栈集成测试: npm run test:fullstack"
# 使脚本可执行
chmod +x test-setup.sh