We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent f4dbf3f commit d0e85faCopy full SHA for d0e85fa
src/gcp/builder.rs
@@ -612,6 +612,8 @@ impl GoogleCloudStorageBuilder {
612
613
#[cfg(test)]
614
mod tests {
615
+ use crate::crypto;
616
+
617
use super::*;
618
use std::collections::HashMap;
619
use std::io::Write;
@@ -764,4 +766,22 @@ mod tests {
764
766
panic!("{key} not propagated as ClientConfigKey");
765
767
}
768
769
770
+ #[test]
771
+ fn gcp_test_crypto_configuration() {
772
+ let builder = GoogleCloudStorageBuilder::default()
773
+ .with_bucket_name("testbucket")
774
+ .with_crypto(Arc::from(crypto::noop_crypto::NoopCrypto {}));
775
776
+ let bytes = b"hello world";
777
+ assert_eq!(
778
+ builder
779
+ .crypto_provider
780
+ .unwrap()
781
+ .digest_sha256(bytes)
782
783
+ .as_ref(),
784
+ bytes
785
+ );
786
+ }
787
0 commit comments