Skip to content

Commit

Permalink
Skip test_list_root on OS X (apache#3772) (apache#4198)
Browse files Browse the repository at this point in the history
* Skip test_list_root if cannot list root filesystem (apache#3772)

* do not run on max

* Remove list check

---------

Co-authored-by: Andrew Lamb <andrew@nerdnetworks.org>
  • Loading branch information
tustvold and alamb authored May 11, 2023
1 parent 1f714fa commit d6c3c01
Showing 1 changed file with 16 additions and 12 deletions.
28 changes: 16 additions & 12 deletions object_store/src/local.rs
Original file line number Diff line number Diff line change
Expand Up @@ -1117,19 +1117,23 @@ mod tests {
}

#[tokio::test]
#[cfg(target_family = "windows")]
async fn test_list_root() {
let integration = LocalFileSystem::new();
let result = integration.list_with_delimiter(None).await;
if cfg!(target_family = "windows") {
let r = result.unwrap_err().to_string();
assert!(
r.contains("Unable to convert URL \"file:///\" to filesystem path"),
"{}",
r
);
} else {
result.unwrap();
}
let fs = LocalFileSystem::new();
let r = fs.list_with_delimiter(None).await.unwrap_err().to_string();

assert!(
r.contains("Unable to convert URL \"file:///\" to filesystem path"),
"{}",
r
);
}

#[tokio::test]
#[cfg(target_os = "linux")]
async fn test_list_root() {
let fs = LocalFileSystem::new();
fs.list_with_delimiter(None).await.unwrap();
}

async fn check_list(
Expand Down

0 comments on commit d6c3c01

Please sign in to comment.