diff --git a/tests-integration/tests/export_logical_tables.rs b/tests-integration/tests/export_logical_tables.rs index 3a8ca25059e..7e33edf549a 100644 --- a/tests-integration/tests/export_logical_tables.rs +++ b/tests-integration/tests/export_logical_tables.rs @@ -908,7 +908,9 @@ async fn metric_export_v2_cli_roundtrip(s3: bool) { ) } else { ( - format!("file://{}", destination.path().display()), + url::Url::from_file_path(destination.path()) + .unwrap() + .to_string(), object_store::ObjectStore::new( object_store::services::Fs::default().root(destination.path().to_str().unwrap()), ) @@ -1061,7 +1063,9 @@ async fn metric_export_v2_disabled_and_legacy_cli() { .await; let (addr, server) = export_http(source.fe_instance().clone()).await; let destination = tempfile::tempdir_in(common_test_util::find_workspace_path(".")).unwrap(); - let uri = format!("file://{}", destination.path().display()); + let uri = url::Url::from_file_path(destination.path()) + .unwrap() + .to_string(); let manifest = destination.path().join("manifest.json"); std::fs::write(&manifest, b"preserve-before-capability-check").unwrap(); let args = [ @@ -1186,7 +1190,7 @@ async fn metric_export_v2_refuses_missing_or_malformed_capability_before_force() let server = tokio::spawn(async move { axum::serve(listener, app).await.unwrap() }); let destination = tempfile::tempdir().unwrap(); let snapshot = destination.path().join("snapshot"); - let uri = format!("file://{}", snapshot.display()); + let uri = url::Url::from_file_path(&snapshot).unwrap().to_string(); let args = [ "export-v2", "create",