Commit graph

7 commits

Author SHA1 Message Date
7de660dbb6 Add tests for config error reporting and multi-vhost startup
Test that the server correctly reports missing certificate errors,
rejects invalid hostnames, fails gracefully on port conflicts, and
starts successfully with multiple virtual hosts configured.
2026-03-05 20:34:31 +09:00
55fe47b172 Replace custom logging with tracing crate and RUST_LOG env var
- Remove custom logging module and init_logging function
- Update main.rs to use tracing_subscriber with EnvFilter
- Remove log_level from global config structure
- Update documentation and tests to use RUST_LOG
- Format long lines in config.rs and test files for better readability
2026-01-22 05:25:46 +00:00
0459cb6220 feat: Implement virtual hosting for multi-domain Gemini server
- Add hostname-based request routing for multiple capsules per server
- Parse virtual host configs from TOML sections ([hostname])
- Implement per-host certificate and content isolation
- Add comprehensive virtual host testing and validation
- Update docs and examples for multi-host deployments

This enables Pollux to serve multiple Gemini domains from one instance,
providing the foundation for multi-tenant Gemini hosting.
2026-01-22 02:38:09 +00:00
bde6181820 Simplify test environment setup to return TempDir directly
- Remove TestEnvironment struct and return TempDir from setup function
- Update tests to compute paths from temp_dir.path() on-demand
- Eliminate unused field warnings and reduce code complexity
- Maintain all test functionality with cleaner design
2026-01-17 00:06:27 +00:00
01bcda10d0 Unify integration test environment and add valid config validation
- Create shared tests/common.rs with TestEnvironment setup
- Simplify gemini_test_client.py to single-request client
- Refactor config validation tests to use common setup
- Add test_valid_config_startup for complete server validation
- Fix clippy warning in main.rs
- Remove unused code and consolidate test infrastructure
2026-01-16 23:59:54 +00:00
3e490d85ef Implement integration tests using system temp directory
- Move tests to use std::env::temp_dir() instead of ./tmp
- Generate test certificates on-demand with openssl
- Create isolated test environments with automatic cleanup
- Add comprehensive config validation integration tests
- Temporarily simplify rate limiting test (complex TLS testing deferred)
- Tests now work out-of-the-box for fresh repository clones
- Run tests sequentially to avoid stderr mixing in parallel execution
2026-01-16 23:26:26 +00:00
4b4651384c Add integration tests for config validation and rate limiting
- tests/config_validation.rs: Tests binary error handling for missing files, invalid config, missing fields, and filesystem issues
- tests/rate_limiting.rs: Placeholder for rate limiting tests (complex TLS testing deferred)
- Integration tests run automatically with cargo test and pre-commit hook
- Tests validate user-facing error messages and exit codes
2026-01-16 22:39:32 +00:00