Skip to content
Merged
Show file tree
Hide file tree
Changes from 4 commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 3 additions & 1 deletion crates/core/src/format.rs
Original file line number Diff line number Diff line change
Expand Up @@ -141,7 +141,9 @@ impl Format {
/// #[cfg(feature = "object-store-aws")]
/// {
/// # tokio_test::block_on(async {
/// let item: Item = stac::io::get_opts("s3://bucket/item.json", [("aws_access_key_id", "...")]).await.unwrap();
/// let catalog: Catalog = stac::io::get_opts("s3://nz-elevation/catalog.json",
/// [("skip_signature", "true"), ("region", "ap-southeast-2")],
/// ).await.unwrap();
/// # })
/// }
/// ```
Expand Down
13 changes: 13 additions & 0 deletions crates/core/tests/examples.rs
Original file line number Diff line number Diff line change
Expand Up @@ -13,3 +13,16 @@ fn v1_1_0(#[files("../../spec-examples/v1.1.0/**/*.json")] path: PathBuf) {
let value: Value = stac::read(path.to_str().unwrap()).unwrap();
value.validate().unwrap();
}

#[test]
#[cfg(feature = "object-store-aws")]
fn read_from_s3() {
tokio_test::block_on(async {
stac::io::get_opts::<stac::Catalog, _, _, _>(
"s3://nz-elevation/catalog.json",
[("skip_signature", "true"), ("region", "ap-southeast-2")],
)
.await
.unwrap();
});
}
Loading