mirror of
https://github.com/lancedb/lancedb.git
synced 2026-08-23 14:38:35 +00:00
test(rust): cover Azure table URI separators on Windows (#3810)
## Summary - add cross-platform regression coverage for Azure table URI construction - assert that az:// database paths always produce forward-slash blob keys ## Root cause ListingDatabase previously used the host filesystem Path join operation for object-store URIs, which inserted a backslash on Windows. The URI construction was corrected in #2575, but the original Azure report had no regression coverage and remained open. ## Validation - cargo fmt --all - cargo test --quiet --features remote -p lancedb test_table_uri_uses_forward_slashes_for_azure - cargo check --quiet --features remote --tests --examples - cargo clippy --quiet --features remote --tests --examples Fixes #2283 <!-- lance-gatekeeper-fix:v1 agent=dd96adfd0fcf303c11e873300663d8f6 generation=1 --> Co-authored-by: Gatefixer <313497061+lancedb-gatefixer[bot]@users.noreply.github.com>
This commit is contained in:
committed by
GitHub
parent
29822306d2
commit
a35f7044ee
@@ -2569,6 +2569,21 @@ mod tests {
|
||||
}
|
||||
}
|
||||
|
||||
/// Regression test for https://github.com/lancedb/lancedb/issues/2283.
|
||||
///
|
||||
/// Object-store URIs must use `/` on every platform. In particular, joining
|
||||
/// with `std::path::Path` used to insert a `\\` into Azure blob keys on
|
||||
/// Windows.
|
||||
#[tokio::test]
|
||||
async fn test_table_uri_uses_forward_slashes_for_azure() {
|
||||
let (_tempdir, mut db) = setup_database().await;
|
||||
db.uri = "az://test/db/test".to_string();
|
||||
|
||||
let uri = db.table_uri("test").unwrap();
|
||||
|
||||
assert_eq!(uri, "az://test/db/test/test.lance");
|
||||
}
|
||||
|
||||
/// Regression: connecting via a URL-style URI (which goes through
|
||||
/// `url::Url::parse` and the `query_pairs_mut()` path) must not
|
||||
/// append a trailing `?` to per-table URIs when the input URI has
|
||||
|
||||
Reference in New Issue
Block a user