Skip to content

Commit fa524ec

Browse files
committed
test(io): test_hdfs_store_path
1 parent ebbb349 commit fa524ec

File tree

1 file changed

+17
-0
lines changed
  • rust/lance-io/src/object_store/providers

1 file changed

+17
-0
lines changed

rust/lance-io/src/object_store/providers/hdfs.rs

Lines changed: 17 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -59,3 +59,20 @@ impl ObjectStoreProvider for HdfsStoreProvider {
5959
})
6060
}
6161
}
62+
63+
#[cfg(test)]
64+
mod tests {
65+
use url::Url;
66+
67+
use super::*;
68+
69+
#[test]
70+
fn test_hdfs_store_path() {
71+
let provider = HdfsStoreProvider;
72+
73+
let url = Url::parse("hdfs://hdfs-server/path/to/file").unwrap();
74+
let path = provider.extract_path(&url).unwrap();
75+
let expected_path = Path::from("/path/to/file");
76+
assert_eq!(path, expected_path);
77+
}
78+
}

0 commit comments

Comments
 (0)