| name | test |
| description | Run integration tests for the Loyalty Points Program using the containerized test suite. All tests are defined in specs/testing.md. |
| metadata | {"author":"Claude Code","version":"1.1"} |
Integration Tests
Run integration tests for the Loyalty Points Program using the portable test container.
Overview
This skill runs 24 automated tests across 6 test groups. All test definitions and requirements are in @specs/testing.md.
The tests are implemented in a containerized suite (@it/) that validates the Loyalty Service:
- Portable: Docker container with Ubuntu 24.04 + curl/jq/bash
- Manual execution: Not integrated in Docker Compose (full control)
- Deterministic: Numeric prefixes (01-06) ensure consistent ordering
Quick Start
cd it && docker build -t loyalty-it .
docker compose restart redis temporal && sleep 30
sleep 30
docker run --network loyalty-frontend loyalty-it http://gateway:8080
Why restart Redis and Temporal?
- Redis stores all customer data (ephemeral, in-memory)
- Temporal stores all workflow state
- Restarting them ensures tests start with a clean slate
- Prevents data conflicts from previous test runs
Test Groups
| Group | Tests | Description |
|---|
| health | H0-H5 (5) | Service health checks |
| core | T1.1-T2.6 (6) | Core features (enroll, earn, spend) |
| saga | T3.1-T3.3 (3) | Saga pattern & compensation |
| grace | T4.1-T4.3 (3) | Grace period & rejoin |
| idempotency | T5.1-T5.3 (3) | Idempotency & transaction tracking |
| errors | T6.1-T6.4 (4) | Error handling & edge cases |
| all | 24 total | All tests |
Run a specific group:
docker compose restart redis temporal && sleep 30
docker run --network loyalty-frontend loyalty-it http://gateway:8080 core
Manual Data Cleanup
If you need to clean data manually without restarting:
docker compose exec redis redis-cli FLUSHALL
docker compose restart temporal && sleep 20
Documentation
Detailed information is in the @it/ component:
| File | Content |
|---|
@specs/testing.md | All test definitions and requirements |
@it/QUICKSTART.md | Common patterns and usage examples |
@it/README.md | Full technical documentation |
@it/VALIDATION.md | Architecture and verification checklist |
@it/MANIFEST.md | Component completeness verification |
For troubleshooting, see @it/QUICKSTART.md or @it/VALIDATION.md.