//! Unit tests migrated from src/security/mod.rs //! These tests were originally in botserver and have been migrated to bottest. #![allow(unused_imports)] #![allow(unused_variables)] #![allow(dead_code)] // Original: use super::*; - tests used internal functions from botserver #[test] fn test_convert_to_https() { assert_eq!( convert_to_https("http://localhost:8080"), "https://localhost:8080" ); assert_eq!( convert_to_https("https://localhost:8080"), "https://localhost:8080" ); assert_eq!(convert_to_https("localhost:8080"), "https://localhost:8080"); } #[test] fn test_get_secure_port() { assert_eq!(get_secure_port("api", 8080), 8443); assert_eq!(get_secure_port("llm", 8081), 8444); assert_eq!(get_secure_port("redis", 6379), 6380); assert_eq!(get_secure_port("unknown", 3000), 3443); } #[test] fn test_security_config_default() { let config = SecurityConfig::default(); assert!(config.tls_enabled); assert!(config.mtls_enabled); assert!(config.auto_generate_certs); assert_eq!(config.renewal_threshold_days, 30); }