Skip to content

Latest commit

 

History

History
83 lines (56 loc) · 1.29 KB

File metadata and controls

83 lines (56 loc) · 1.29 KB

Testing Guide

Available Make Targets

We provide several Make targets for testing convenience:

# View all available commands
make help

Running Tests

Quick Method (Recommended)

Use the automated test target that handles Redis setup and cleanup:

# Start Redis, run tests, then cleanup automatically
task test-with-redis

Manual Method

For more control over the testing process:

# Start Redis service
task redis

# Run all tests (requires Redis to be running)
task test

# Stop Redis service when done
task redis-stop

Direct Go Test Command

You can also run tests directly if Redis is already running:

cd tests && go test -v

Managing Redis Service

Starting Redis

# Start Redis service and wait for it to be ready
task redis

Stopping Redis

# Stop and remove Redis containers
task redis-stop

# Or use docker-compose directly for advanced options
docker-compose down -v  # Also removes data volumes

Viewing Redis Logs

# View Redis logs
docker-compose logs redis

# Follow logs in real-time
docker-compose logs -f redis

Connecting to Redis

# Connect using redis-cli
docker-compose exec redis redis-cli

# Or use local redis-cli (if installed)
redis-cli -h localhost -p 6379