INNER CODE UNIT · Rust
test_build_from_json_memory
splitgraph/seafowl · object_store_factory/src/lib.rs:251
fn test_build_from_json_memory() {
let url = Url::parse("memory:///").unwrap();
let json_str = json!({
"type": "memory"
})
.to_string();
let config = ObjectStoreConfig::build_from_json(&url, &json_str).unwrap();
assert_eq!(config, ObjectStoreConfig::Memory);
}
#[test]
fn test_build_from_json_amazon_s3() {
let url = Url::parse("s3://bucket").unwrap();
let json_str = json!({
"type": "s3",
"bucket": "bucket",
"region": "us-west-2",