MCPcopy Create free account
hub / github.com/AI45Lab/Code / config_search_defaults_off_until_enabled

Function config_search_defaults_off_until_enabled

core/src/workspace/s3.rs:1385–1398  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

1383
1384 #[test]
1385 fn config_search_defaults_off_until_enabled() {
1386 let cfg = S3BackendConfig::new("bucket", "ws", "AK", "SK");
1387 assert!(!cfg.search_enabled);
1388 assert!(cfg.max_objects_scanned.is_none());
1389 assert!(cfg.max_grep_bytes_per_object.is_none());
1390
1391 let cfg = cfg
1392 .enable_search(true)
1393 .max_objects_scanned(50)
1394 .max_grep_bytes_per_object(256 * 1024);
1395 assert!(cfg.search_enabled);
1396 assert_eq!(cfg.max_objects_scanned, Some(50));
1397 assert_eq!(cfg.max_grep_bytes_per_object, Some(256 * 1024));
1398 }
1399
1400 #[test]
1401 fn backend_applies_search_defaults_when_config_omits_them() {

Callers

nothing calls this directly

Calls 3

max_objects_scannedMethod · 0.80
enable_searchMethod · 0.80

Tested by

no test coverage detected