MCPcopy Create free account
hub / github.com/dtormoen/tsk-tsk / test_squid_conf_path_resolution

Function test_squid_conf_path_resolution

src/context/tsk_config.rs:1886–1903  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

1884
1885 #[test]
1886 fn test_squid_conf_path_resolution() {
1887 let temp_dir = tempfile::TempDir::new().unwrap();
1888 let squid_file = temp_dir.path().join("custom-squid.conf");
1889 std::fs::write(&squid_file, "http_port 3128\nacl custom src all").unwrap();
1890
1891 let config = TskConfig {
1892 defaults: SharedConfig {
1893 squid_conf_path: Some(squid_file.to_string_lossy().to_string()),
1894 ..Default::default()
1895 },
1896 ..Default::default()
1897 };
1898 let resolved = config.resolve_config("my-project", None, None);
1899 assert_eq!(
1900 resolved.squid_conf,
1901 Some("http_port 3128\nacl custom src all".to_string())
1902 );
1903 }
1904
1905 #[test]
1906 fn test_squid_conf_project_path_resolution() {

Callers

nothing calls this directly

Calls 2

pathMethod · 0.80
resolve_configMethod · 0.80

Tested by

no test coverage detected