Organize documentation: move all markdown files to docs/ directory
- Created docs/ directory for better organization - Moved 35 markdown files from root to docs/ - Includes all status reports, guides, and testing documentation Co-Authored-By: Warp <agent@warp.dev>
This commit is contained in:
75
docs/QUICK-START-TESTING.md
Normal file
75
docs/QUICK-START-TESTING.md
Normal file
@@ -0,0 +1,75 @@
|
||||
# Quick Start Testing Guide
|
||||
|
||||
This is a condensed guide to quickly test the Calypso API.
|
||||
|
||||
## 1. Setup (One-time)
|
||||
|
||||
```bash
|
||||
# Install requirements
|
||||
sudo ./scripts/install-requirements.sh
|
||||
|
||||
# Setup database
|
||||
sudo -u postgres createdb calypso
|
||||
sudo -u postgres createuser calypso
|
||||
sudo -u postgres psql -c "ALTER USER calypso WITH PASSWORD 'calypso123';"
|
||||
sudo -u postgres psql -c "GRANT ALL PRIVILEGES ON DATABASE calypso TO calypso;"
|
||||
|
||||
# Create test user
|
||||
./scripts/setup-test-user.sh
|
||||
|
||||
# Set environment variables
|
||||
export CALYPSO_DB_PASSWORD="calypso123"
|
||||
export CALYPSO_JWT_SECRET="test-jwt-secret-key-minimum-32-characters-long"
|
||||
```
|
||||
|
||||
## 2. Start the API
|
||||
|
||||
```bash
|
||||
cd backend
|
||||
go mod download
|
||||
go run ./cmd/calypso-api -config config.yaml.example
|
||||
```
|
||||
|
||||
## 3. Run Automated Tests
|
||||
|
||||
In another terminal:
|
||||
|
||||
```bash
|
||||
./scripts/test-api.sh
|
||||
```
|
||||
|
||||
## 4. Manual Testing
|
||||
|
||||
### Get a token:
|
||||
```bash
|
||||
TOKEN=$(curl -s -X POST http://localhost:8080/api/v1/auth/login \
|
||||
-H "Content-Type: application/json" \
|
||||
-d '{"username":"admin","password":"admin123"}' | jq -r '.token')
|
||||
```
|
||||
|
||||
### Test endpoints:
|
||||
```bash
|
||||
# Health
|
||||
curl http://localhost:8080/api/v1/health
|
||||
|
||||
# Current user
|
||||
curl http://localhost:8080/api/v1/auth/me \
|
||||
-H "Authorization: Bearer $TOKEN"
|
||||
|
||||
# List disks
|
||||
curl http://localhost:8080/api/v1/storage/disks \
|
||||
-H "Authorization: Bearer $TOKEN"
|
||||
|
||||
# List services
|
||||
curl http://localhost:8080/api/v1/system/services \
|
||||
-H "Authorization: Bearer $TOKEN"
|
||||
```
|
||||
|
||||
## Troubleshooting
|
||||
|
||||
- **Database connection fails**: Check PostgreSQL is running: `sudo systemctl status postgresql`
|
||||
- **401 Unauthorized**: Run `./scripts/setup-test-user.sh` to create the admin user
|
||||
- **SCST errors**: SCST may not be installed - this is expected in test environments
|
||||
|
||||
For detailed testing instructions, see `TESTING-GUIDE.md`.
|
||||
|
||||
Reference in New Issue
Block a user