INNER CODE UNIT · Rust
test_build_aws_object_store
splitgraph/seafowl · object_store_factory/src/lib.rs:321
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 {
HashMap::from([
("access_key_id".to_string(), "my-key".to_string()),
("secret_access_key".to_string(), "my-secret".to_string()),
])
};
let store = temp_env::async_with_vars(
[
("AWS_ACCESS_KEY_ID", Some("env-key")),
("AWS_SECRET_ACCESS_KEY", Some("env-secret")),
],
build_object_store_from_opts(&url, options),
)