MCPcopy Create free account
hub / github.com/NVIDIA/OpenShell / test_build_server_config

Function test_build_server_config

crates/openshell-server/src/tls.rs:395–410  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

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() {

Callers

nothing calls this directly

Calls 4

build_server_configFunction · 0.85
pathMethod · 0.80
install_rustls_providerFunction · 0.70

Tested by

no test coverage detected