Skip to content

Commit

Permalink
update
Browse files Browse the repository at this point in the history
  • Loading branch information
RWDai committed Jun 19, 2024
1 parent ed22ba5 commit 63b3a4b
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 4 deletions.
2 changes: 1 addition & 1 deletion tardis/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -218,7 +218,7 @@ lettre = { version = "0.11", features = [

# Object Storage
# rust-s3 = { version = "0.33", optional = true }
rust-s3 = { git = "https://github.com/tuist/rust-s3.git", rev = "3ee40ba", optional = true }
rust-s3 = { git = "https://github.com/tuist/rust-s3.git", rev = "31950a7", optional = true }
# rust-s3 = { path = "../../rust-s3/s3", optional = true }
anyhow = { version = "1.0", optional = true }

Expand Down
7 changes: 4 additions & 3 deletions tardis/tests/test_os_client.rs
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
use std::env;

use s3::serde_types::LifecycleFilter;
use tracing::info;

use tardis::basic::result::TardisResult;
Expand Down Expand Up @@ -33,16 +34,16 @@ async fn test_os_client() -> TardisResult<()> {

info!("object_create_url = {:?}", TardisFuns::os().object_exist("test/test1.txt", Some(bucket_name)).await?);

let put_config = s3::serde_types::BucketLifecycleConfiguration::new(vec![s3::serde_types::LifecycleRule::builder("Enabled".to_string())
.expiration(s3::serde_types::Expiration::new(None, Some(30), Some(true)))
let put_config = s3::serde_types::BucketLifecycleConfiguration::new(vec![s3::serde_types::LifecycleRule::builder("Enabled")
.expiration(s3::serde_types::Expiration::new(None, Some(30), None))
.filter(LifecycleFilter::new(None, None, None, Some("test".to_string()), None))
.build()]);
TardisFuns::os().put_lifecycle(bucket_name, put_config.clone()).await?;

let get_config = TardisFuns::os().get_lifecycle(bucket_name).await?;
info!("get_lifecycle_rule = {:?}", get_config);
assert_eq!(serde_json::to_string(&put_config).unwrap(), serde_json::to_string(&get_config).unwrap());

TardisFuns::os().delete_lifecycle(bucket_name).await?;
//info!("object_create_url = {}", TardisFuns::os().object_create_url("test/test2.txt", 1, Some(bucket_name.clone()))?);
//
//info!("object_delete_url = {}", TardisFuns::os().object_delete_url("test/test.txt", 60, Some(bucket_name.clone()))?);
Expand Down

0 comments on commit 63b3a4b

Please sign in to comment.