Skip to content

Commit

Permalink
test: fix list_files_and_parse_table_name path issue on windows (#3349)
Browse files Browse the repository at this point in the history
* fix: always converts path to slash

* chore: print

* chore: normalize dir

* chore: compile

* chore: rm print
  • Loading branch information
evenyag authored Feb 22, 2024
1 parent 564fe3b commit 53105b9
Show file tree
Hide file tree
Showing 3 changed files with 11 additions and 1 deletion.
7 changes: 7 additions & 0 deletions Cargo.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

1 change: 1 addition & 0 deletions src/operator/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -61,3 +61,4 @@ tonic.workspace = true

[dev-dependencies]
common-test-util.workspace = true
path-slash = "0.2"
4 changes: 3 additions & 1 deletion src/operator/src/statement/copy_database.rs
Original file line number Diff line number Diff line change
Expand Up @@ -206,6 +206,7 @@ mod tests {
use object_store::services::Fs;
use object_store::util::normalize_dir;
use object_store::ObjectStore;
use path_slash::PathExt;
use table::requests::CopyDatabaseRequest;

use crate::statement::copy_database::{list_files_to_copy, parse_file_name_to_copy};
Expand All @@ -223,10 +224,11 @@ mod tests {
object_store.write("d", "").await.unwrap();
object_store.write("e.f.parquet", "").await.unwrap();

let location = normalize_dir(&dir.path().to_slash().unwrap());
let request = CopyDatabaseRequest {
catalog_name: "catalog_0".to_string(),
schema_name: "schema_0".to_string(),
location: store_dir,
location,
with: [("FORMAT".to_string(), "parquet".to_string())]
.into_iter()
.collect(),
Expand Down

0 comments on commit 53105b9

Please sign in to comment.