HTTP server testing added #101

Merged
supawitgolf merged 1 commit from http-server into main 2025-09-01 09:20:52 +00:00
supawitgolf commented 2025-08-29 17:30:23 +00:00 (Migrated from github.com)

This PR introduces a mock server and automated test suite to validate Astra’s HTTP server functionality using Lust.

tests/mock_server.lua
• Implements a mock HTTP server with full CRUD operations
• Backed by a temporary SQLite database (posts_test.db)
tests/http_server.lua
• Provides end-to-end tests for POST, GET, PUT, and DELETE endpoints
• Uses Lust for assertions and schema validation checks
• Handles DB cleanup (.db, -wal, -shm) and graceful server shutdown after test execution

This PR introduces a mock server and automated test suite to validate Astra’s HTTP server functionality using [Lust](https://github.com/bjornbytes/lust). tests/mock_server.lua • Implements a mock HTTP server with full CRUD operations • Backed by a temporary SQLite database (posts_test.db) tests/http_server.lua • Provides end-to-end tests for POST, GET, PUT, and DELETE endpoints • Uses Lust for assertions and schema validation checks • Handles DB cleanup (.db, -wal, -shm) and graceful server shutdown after test execution
ElhamAryanpur commented 2025-09-01 09:20:47 +00:00 (Migrated from github.com)

Looks good

Looks good
Sign in to join this conversation.
No description provided.