()
| 393 | |
| 394 | #[test] |
| 395 | fn test_build_server_config() { |
| 396 | install_rustls_provider(); |
| 397 | let dir = tempfile::tempdir().expect("failed to create tempdir"); |
| 398 | let _ = generate_test_certs_with_ca(dir.path()); |
| 399 | |
| 400 | let config = build_server_config( |
| 401 | &dir.path().join("server-cert.pem"), |
| 402 | &dir.path().join("server-key.pem"), |
| 403 | Some(&dir.path().join("ca.pem")), |
| 404 | false, |
| 405 | ) |
| 406 | .expect("failed to build server config"); |
| 407 | |
| 408 | assert!(config.alpn_protocols.contains(&b"h2".to_vec())); |
| 409 | assert!(config.alpn_protocols.contains(&b"http/1.1".to_vec())); |
| 410 | } |
| 411 | |
| 412 | #[test] |
| 413 | fn test_reload_success() { |
nothing calls this directly
no test coverage detected