()
| 7 | |
| 8 | #[test] |
| 9 | fn test_certificate_generation() { |
| 10 | let config = Config { |
| 11 | database: ":memory:".to_string(), |
| 12 | ssl: true, |
| 13 | ssl_cert: None, |
| 14 | ssl_key: None, |
| 15 | ssl_ca: None, |
| 16 | ssl_ephemeral: true, |
| 17 | in_memory: true, |
| 18 | port: 5432, |
| 19 | log_level: "info".to_string(), |
| 20 | no_tcp: false, |
| 21 | socket_dir: "/tmp".to_string(), |
| 22 | use_pooling: false, |
| 23 | max_connections: 100, |
| 24 | pool_size: 8, |
| 25 | pool_connection_timeout_seconds: 30, |
| 26 | pool_idle_timeout_seconds: 300, |
| 27 | pool_health_check_interval_seconds: 60, |
| 28 | pool_max_retries: 3, |
| 29 | row_desc_cache_size: 1000, |
| 30 | row_desc_cache_ttl: 10, |
| 31 | param_cache_size: 500, |
| 32 | param_cache_ttl: 30, |
| 33 | query_cache_size: 1000, |
| 34 | query_cache_ttl: 600, |
| 35 | execution_cache_ttl: 300, |
| 36 | result_cache_size: 100, |
| 37 | result_cache_ttl: 60, |
| 38 | statement_pool_size: 100, |
| 39 | cache_metrics_interval: 300, |
| 40 | schema_cache_ttl: 300, |
| 41 | buffer_monitoring: false, |
| 42 | buffer_pool_size: 50, |
| 43 | buffer_initial_capacity: 4096, |
| 44 | buffer_max_capacity: 65536, |
| 45 | auto_cleanup: false, |
| 46 | memory_monitoring: false, |
| 47 | memory_threshold: 67108864, |
| 48 | high_memory_threshold: 134217728, |
| 49 | memory_check_interval: 10, |
| 50 | enable_mmap: false, |
| 51 | mmap_min_size: 65536, |
| 52 | mmap_max_memory: 1048576, |
| 53 | temp_dir: None, |
| 54 | pragma_journal_mode: "WAL".to_string(), |
| 55 | pragma_synchronous: "NORMAL".to_string(), |
| 56 | pragma_cache_size: -64000, |
| 57 | pragma_mmap_size: 268435456, |
| 58 | migrate: false, |
| 59 | }; |
| 60 | |
| 61 | let cert_manager = CertificateManager::new(Arc::new(config.clone())); |
| 62 | |
| 63 | // Test in-memory certificate generation |
| 64 | let rt = tokio::runtime::Runtime::new().unwrap(); |
| 65 | let result = rt.block_on(cert_manager.initialize()); |
| 66 | assert!(result.is_ok()); |
nothing calls this directly
no test coverage detected