Skip to content

Commit

Permalink
test: fix broken tests
Browse files Browse the repository at this point in the history
  • Loading branch information
jorgehermo9 committed Nov 2, 2024
1 parent 398efed commit 39e4d62
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 6 deletions.
1 change: 1 addition & 0 deletions core/src/services/azblob/backend.rs
Original file line number Diff line number Diff line change
Expand Up @@ -549,6 +549,7 @@ impl Access for AzblobBackend {
match status {
StatusCode::OK => {
let headers = resp.headers();
dbg!(&headers);
let mut meta = parse_into_metadata(path, headers)?;
// TODO: Refactor in common with s3 metadata parsing
// do the same as in parse_into_metadata... but for user metadata
Expand Down
9 changes: 3 additions & 6 deletions core/src/services/azblob/core.rs
Original file line number Diff line number Diff line change
Expand Up @@ -236,17 +236,13 @@ impl AzblobCore {
) -> Result<Request<Buffer>> {
let p = build_abs_path(&self.root, path);

let mut url = format!(
let url = format!(
"{}/{}/{}",
self.endpoint,
self.container,
percent_encode_path(&p)
);

if let Some(_) = args.user_metadata() {
url.push_str("?comp=metadata");
}

let mut req = Request::put(&url);

// Set user metadata headers.
Expand All @@ -264,6 +260,7 @@ impl AzblobCore {
if let Some(cache_control) = args.cache_control() {
req = req.header(constants::X_MS_BLOB_CACHE_CONTROL, cache_control);
}

if let Some(size) = size {
req = req.header(CONTENT_LENGTH, size)
}
Expand Down Expand Up @@ -495,7 +492,7 @@ impl AzblobCore {
let p = build_abs_path(&self.root, path);

let url = format!(
"{}/{}/{}?comp=metadata",
"{}/{}/{}",
self.endpoint,
self.container,
percent_encode_path(&p)
Expand Down

0 comments on commit 39e4d62

Please sign in to comment.