From 8bcc96532ad4272bebff09796b6dda87b9030a9a Mon Sep 17 00:00:00 2001 From: Rito Takeuchi Date: Sat, 24 Sep 2022 21:36:56 +0900 Subject: [PATCH] Merge s3_build_error and s3_success into one test (#3602) --- datafusion-cli/src/object_storage.rs | 7 +------ 1 file changed, 1 insertion(+), 6 deletions(-) diff --git a/datafusion-cli/src/object_storage.rs b/datafusion-cli/src/object_storage.rs index 861830d81c8b..4d21e84a17c3 100644 --- a/datafusion-cli/src/object_storage.rs +++ b/datafusion-cli/src/object_storage.rs @@ -130,20 +130,15 @@ mod tests { } #[test] - fn s3_build_error() { + fn s3_region_validation() { let s3 = "s3://bucket_name/path"; let provider = DatafusionCliObjectStoreProvider {}; let err = provider .get_by_url(&Url::from_str(s3).unwrap()) .unwrap_err(); assert!(err.to_string().contains("Generic S3 error: Missing region")); - } - #[test] - fn s3_success() { - let s3 = "s3://bucket_name/path"; env::set_var("AWS_DEFAULT_REGION", "us-east-1"); - let provider = DatafusionCliObjectStoreProvider {}; assert!(provider.get_by_url(&Url::from_str(s3).unwrap()).is_ok()); env::remove_var("AWS_DEFAULT_REGION"); }