Skip to content

Commit d12a378

Browse files
committed
fix: Update new tiered.rs tests for range request API changes
Tests added to main after this branch diverged still used the old get_object signature (1 arg, 2-tuple return). Update them to pass None for the range parameter and destructure the 3-tuple.
1 parent 4a2da3d commit d12a378

1 file changed

Lines changed: 8 additions & 8 deletions

File tree

objectstore-service/src/backend/tiered.rs

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -1597,7 +1597,7 @@ mod tests {
15971597
);
15981598

15991599
// get_object should follow the tombstone and return the payload.
1600-
let (got_meta, s) = storage.get_object(&id).await.unwrap().unwrap();
1600+
let (got_meta, _, s) = storage.get_object(&id, None).await.unwrap().unwrap();
16011601
let body = stream::read_to_vec(s).await.unwrap();
16021602
assert_eq!(body, payload);
16031603
assert_eq!(got_meta.content_type, "application/octet-stream");
@@ -1682,7 +1682,7 @@ mod tests {
16821682
.unwrap();
16831683
assert!(error.is_none());
16841684

1685-
let (_, s) = storage.get_object(&id).await.unwrap().unwrap();
1685+
let (_, _, s) = storage.get_object(&id, None).await.unwrap().unwrap();
16861686
let body = stream::read_to_vec(s).await.unwrap();
16871687

16881688
let mut expected = Vec::new();
@@ -1722,7 +1722,7 @@ mod tests {
17221722
hv.get(&id).expect_not_found();
17231723

17241724
// The object should not be reachable.
1725-
assert!(storage.get_object(&id).await.unwrap().is_none());
1725+
assert!(storage.get_object(&id, None).await.unwrap().is_none());
17261726
}
17271727

17281728
#[tokio::test]
@@ -1833,7 +1833,7 @@ mod tests {
18331833
lt.get(&new_lt_id).expect_object();
18341834

18351835
// Assert the contents of the new revision.
1836-
let (_, s) = storage.get_object(&id).await.unwrap().unwrap();
1836+
let (_, _, s) = storage.get_object(&id, None).await.unwrap().unwrap();
18371837
let body = stream::read_to_vec(s).await.unwrap();
18381838
assert_eq!(body, payload2);
18391839
}
@@ -2063,7 +2063,7 @@ mod tests {
20632063
storage.join().await;
20642064

20652065
// The object is there.
2066-
let (_, s) = storage.get_object(&id).await.unwrap().unwrap();
2066+
let (_, _, s) = storage.get_object(&id, None).await.unwrap().unwrap();
20672067
let body = stream::read_to_vec(s).await.unwrap();
20682068
assert_eq!(body, payload);
20692069

@@ -2086,7 +2086,7 @@ mod tests {
20862086
assert!(remaining.is_empty());
20872087

20882088
// The object is still there after recovery.
2089-
let (_, s) = storage.get_object(&id).await.unwrap().unwrap();
2089+
let (_, _, s) = storage.get_object(&id, None).await.unwrap().unwrap();
20902090
let body = stream::read_to_vec(s).await.unwrap();
20912091
assert_eq!(body, payload);
20922092
}
@@ -2200,7 +2200,7 @@ mod tests {
22002200
storage.join().await;
22012201

22022202
// The object is there.
2203-
let (_, s) = storage.get_object(&id).await.unwrap().unwrap();
2203+
let (_, _, s) = storage.get_object(&id, None).await.unwrap().unwrap();
22042204
let body = stream::read_to_vec(s).await.unwrap();
22052205
assert_eq!(body, payload);
22062206

@@ -2223,7 +2223,7 @@ mod tests {
22232223
assert!(remaining.is_empty());
22242224

22252225
// The object is there after recovery.
2226-
let (_, s) = storage.get_object(&id).await.unwrap().unwrap();
2226+
let (_, _, s) = storage.get_object(&id, None).await.unwrap().unwrap();
22272227
let body = stream::read_to_vec(s).await.unwrap();
22282228
assert_eq!(body, payload);
22292229
}

0 commit comments

Comments
 (0)