INNER CODE UNIT · Rust
test_build_from_json_invalid_scheme
splitgraph/seafowl · object_store_factory/src/lib.rs:308
fn test_build_from_json_invalid_scheme() {
let url = Url::parse("ftp://bucket").unwrap();
let json_str = json!({
"type": "ftp"
})
.to_string();
let result = ObjectStoreConfig::build_from_json(&url, &json_str);
assert!(result.is_err());
}
#[rstest]
#[tokio::test]
async fn test_build_aws_object_store(#[values(true, false)] use_env: bool) {
let url = Url::parse("s3://my-bucket").unwrap();
let options: HashMap<String, String> = if use_env {
HashMap::new()
} else {