We provide several Make targets for testing convenience:
# View all available commands
make helpUse the automated test target that handles Redis setup and cleanup:
# Start Redis, run tests, then cleanup automatically
task test-with-redisFor 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-stopYou can also run tests directly if Redis is already running:
cd tests && go test -v# Start Redis service and wait for it to be ready
task 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# View Redis logs
docker-compose logs redis
# Follow logs in real-time
docker-compose logs -f redis# Connect using redis-cli
docker-compose exec redis redis-cli
# Or use local redis-cli (if installed)
redis-cli -h localhost -p 6379