()
| 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() { |
nothing calls this directly
no test coverage detected