()
| 269 | |
| 270 | #[tokio::test] |
| 271 | async fn test_tls_options_default() { |
| 272 | let opts = TlsOptions::default(); |
| 273 | assert!(!opts.is_secure()); |
| 274 | |
| 275 | create_test_file( |
| 276 | "../../tests/certs/cert.pem", |
| 277 | &opts.config_dir.join("cert.pem"), |
| 278 | ); |
| 279 | create_test_file( |
| 280 | "../../tests/certs/key.pem", |
| 281 | &opts.config_dir.join("key.pem"), |
| 282 | ); |
| 283 | create_test_file("../../tests/certs/ca.pem", &opts.config_dir.join("ca.pem")); |
| 284 | |
| 285 | // Should return temp paths in test mode |
| 286 | assert_eq!(opts.cert_path().unwrap(), opts.config_dir.join("cert.pem")); |
| 287 | assert_eq!(opts.key_path().unwrap(), opts.config_dir.join("key.pem")); |
| 288 | assert_eq!(opts.ca_path().unwrap(), opts.config_dir.join("ca.pem")); |
| 289 | assert!(opts.is_secure()); |
| 290 | |
| 291 | let config = opts.server_config().unwrap(); |
| 292 | assert!(config.is_some()); |
| 293 | } |
| 294 | |
| 295 | #[test] |
| 296 | fn test_tls_options_with_paths() { |
nothing calls this directly
no test coverage detected