Guias

AgrSis - Test Instructions

AgrSis - Test Instructions

System Status ✅

All Docker containers are running properly:

Test Users Created

Producer Account

Supplier Account

All Users Updated

All 57 users in the database now have the password: password

Quick Test Commands

Test Producer Login via API:

curl -X POST http://localhost:8000/api/v1/login \
  -H "Content-Type: application/json" \
  -d '{"email":"produtor@teste.com","password":"password","user_type":"produtor"}'

Test Supplier Login via API:

curl -X POST http://localhost:8000/api/v1/login \
  -H "Content-Type: application/json" \
  -d '{"email":"fornecedor@teste.com","password":"password","user_type":"fornecedor"}'

Docker Container Commands

View running containers:

docker ps | grep agrsis

View API logs:

docker logs agrsis_api --tail=50

Execute commands in API container:

docker exec agrsis_api php artisan tinker

Important Notes

  • All services are running in Docker containers
  • Database is PostgreSQL on port 5433 (internal 5432)
  • API is using the correct Docker database
  • Frontend applications are configured to connect to the API at http://localhost:8000

Troubleshooting

If login fails:

  1. Check if containers are running: docker ps
  2. Restart API container: docker restart agrsis_api
  3. Check API logs: docker logs agrsis_api --tail=100
  4. Verify database connection: docker exec agrsis_api php artisan tinker --execute="DB::connection()->getPdo()"
Copyright © 2026