MCPcopy Index your code
hub / github.com/AI45Lab/Code / config_builder_sets_fields

Function config_builder_sets_fields

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

Source from the content-addressed store, hash-verified

1274
1275 #[test]
1276 fn config_builder_sets_fields() {
1277 let cfg = S3BackendConfig::new("bucket", "prefix", "AK", "SK")
1278 .endpoint("https://minio.local:9000")
1279 .region("cn-east-1")
1280 .session_token("TOKEN")
1281 .force_path_style(true)
1282 .request_timeout(Duration::from_secs(5))
1283 .max_read_bytes(4096);
1284 assert_eq!(cfg.bucket, "bucket");
1285 assert_eq!(cfg.prefix, "prefix");
1286 assert_eq!(cfg.endpoint.as_deref(), Some("https://minio.local:9000"));
1287 assert_eq!(cfg.region.as_deref(), Some("cn-east-1"));
1288 assert_eq!(cfg.session_token.as_deref(), Some("TOKEN"));
1289 assert!(cfg.force_path_style);
1290 assert_eq!(cfg.request_timeout, Some(Duration::from_secs(5)));
1291 assert_eq!(cfg.max_read_bytes, Some(4096));
1292 }
1293
1294 #[test]
1295 fn config_default_max_read_bytes_is_none_until_set() {

Callers

nothing calls this directly

Calls 6

max_read_bytesMethod · 0.80
force_path_styleMethod · 0.80
session_tokenMethod · 0.80
regionMethod · 0.80
request_timeoutMethod · 0.45
endpointMethod · 0.45

Tested by

no test coverage detected