Skip to content

Commit

Permalink
create aws-test in test folder, no_run doctest
Browse files Browse the repository at this point in the history
  • Loading branch information
jrjdavidson committed Feb 3, 2025
1 parent fb1383a commit 37c34cc
Show file tree
Hide file tree
Showing 2 changed files with 14 additions and 1 deletion.
2 changes: 1 addition & 1 deletion crates/core/src/format.rs
Original file line number Diff line number Diff line change
Expand Up @@ -135,7 +135,7 @@ impl Format {
///
/// # Examples
///
/// ```
/// ```no_run
/// use stac::{Item, Format};
///
/// #[cfg(feature = "object-store-aws")]
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();
});
}

0 comments on commit 37c34cc

Please sign in to comment.