Skip to content

Commit d4324a2

Browse files
committed
Fix S3 integration test for migration to Jiff
It was including punctuation in the date, which isn't allowed in s3 bucket names.
1 parent 3a88c95 commit d4324a2

1 file changed

Lines changed: 5 additions & 6 deletions

File tree

tests/s3_integration.rs

Lines changed: 5 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -28,8 +28,8 @@ use aws_sdk_s3::types::{
2828
ExpirationStatus, LifecycleExpiration, LifecycleRule, LifecycleRuleFilter,
2929
};
3030
use indoc::indoc;
31-
use jiff::Timestamp;
32-
use rand::Rng;
31+
use jiff::{Timestamp, tz::TimeZone};
32+
use rand::random;
3333
use tokio::runtime::Runtime;
3434

3535
struct TempBucket {
@@ -48,11 +48,10 @@ impl TempBucket {
4848
.enable_all()
4949
.build()
5050
.expect("Create runtime");
51-
let mut rng = rand::rng();
51+
let date = Timestamp::now().to_zoned(TimeZone::UTC).date();
5252
let bucket_name = format!(
53-
"conserve-s3-integration-{time}-{rand:x}",
54-
time = Timestamp::now(),
55-
rand = rng.random::<u64>()
53+
"conserve-s3-integration-{date}-{rand:x}",
54+
rand = random::<u64>()
5655
);
5756
let app_name = AppName::new(format!(
5857
"conserve-s3-integration-test-{}",

0 commit comments

Comments
 (0)