Skip to content

Commit

Permalink
fix wrong test and add more context
Browse files Browse the repository at this point in the history
  • Loading branch information
zjregee committed Mar 3, 2024
1 parent 4981d6a commit 6853dfa
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 5 deletions.
5 changes: 1 addition & 4 deletions core/src/services/swift/core.rs
Original file line number Diff line number Diff line change
Expand Up @@ -271,10 +271,7 @@ mod tests {
hash: "5e6b5b70b0426b1cc1968003e1afa5ad".to_string(),
name: "test.txt".to_string(),
last_modified: "2023-11-01T03:00:23.147480".to_string(),
content_type: Some(
"multipart/form-data;boundary=------------------------25004a866ee9c0cb"
.to_string()
),
content_type: Some("text/plain".to_string()),
}
);

Expand Down
4 changes: 3 additions & 1 deletion core/src/services/swift/lister.rs
Original file line number Diff line number Diff line change
Expand Up @@ -95,7 +95,9 @@ impl oio::PageList for SwiftLister {
meta.set_content_length(bytes);
meta.set_content_md5(hash.as_str());

// we'll change "2023-10-28T19:18:11.682610" to "2023-10-28T19:18:11.682610Z"
// OpenStack Swift returns time without 'Z' at the end,
// which causes an error in parse_datetime_from_rfc3339.
// we'll change "2023-10-28T19:18:11.682610" to "2023-10-28T19:18:11.682610Z".
if !last_modified.ends_with('Z') {
last_modified.push('Z');
}
Expand Down

0 comments on commit 6853dfa

Please sign in to comment.