aboutsummaryrefslogtreecommitdiff
path: root/src/garage/tests/bucket.rs
diff options
context:
space:
mode:
authorQuentin Dufour <quentin@deuxfleurs.fr>2022-02-09 18:29:08 +0100
committerQuentin Dufour <quentin@deuxfleurs.fr>2022-03-07 17:32:07 +0100
commit1e639ec67c72730fda370e1c3dfe9cbba0b4fa63 (patch)
treef782305f3de7f53178f9b57de93ab4aa96c58d0c /src/garage/tests/bucket.rs
parentcfea1e0315a2e2ad72ce05dffb44ed355e880e46 (diff)
downloadgarage-1e639ec67c72730fda370e1c3dfe9cbba0b4fa63.tar.gz
garage-1e639ec67c72730fda370e1c3dfe9cbba0b4fa63.zip
Functional test for ListMultipartUploads
Diffstat (limited to 'src/garage/tests/bucket.rs')
-rw-r--r--src/garage/tests/bucket.rs23
1 files changed, 16 insertions, 7 deletions
diff --git a/src/garage/tests/bucket.rs b/src/garage/tests/bucket.rs
index 2c3af542..1a534042 100644
--- a/src/garage/tests/bucket.rs
+++ b/src/garage/tests/bucket.rs
@@ -23,12 +23,14 @@ async fn test_bucket_all() {
{
// List buckets
let r = ctx.client.list_buckets().send().await.unwrap();
-
- assert_eq!(r.buckets.as_ref().unwrap().len(), 1);
- assert_eq!(
- r.buckets.unwrap().first().unwrap().name.as_ref().unwrap(),
- bucket_name
- );
+ assert!(r
+ .buckets
+ .as_ref()
+ .unwrap()
+ .into_iter()
+ .filter(|x| x.name.as_ref().is_some())
+ .find(|x| x.name.as_ref().unwrap() == "hello")
+ .is_some());
}
{
// Get its location
@@ -73,6 +75,13 @@ async fn test_bucket_all() {
{
// Check bucket is deleted with List buckets
let r = ctx.client.list_buckets().send().await.unwrap();
- assert_eq!(r.buckets.as_ref().unwrap().len(), 0);
+ assert!(r
+ .buckets
+ .as_ref()
+ .unwrap()
+ .into_iter()
+ .filter(|x| x.name.as_ref().is_some())
+ .find(|x| x.name.as_ref().unwrap() == "hello")
+ .is_none());
}
}