Skip to content

Commit

Permalink
Fix tests
Browse files Browse the repository at this point in the history
Signed-off-by: Xuanwo <github@xuanwo.io>
  • Loading branch information
Xuanwo committed May 31, 2023
1 parent 00b18e3 commit d6388f9
Showing 1 changed file with 8 additions and 0 deletions.
8 changes: 8 additions & 0 deletions tests/azure/storage.rs
Original file line number Diff line number Diff line change
Expand Up @@ -55,6 +55,7 @@ async fn test_head_blob() -> Result<()> {

let mut builder = http::Request::builder();
builder = builder.method(http::Method::HEAD);
builder = builder.header("x-ms-version", "2023-01-03");
builder = builder.uri(format!("{}/{}", url, "not_exist_file"));
let mut req = builder.body("")?;

Expand Down Expand Up @@ -94,6 +95,8 @@ async fn test_head_object_with_encoded_characters() -> Result<()> {

let mut req = http::Request::new("");
*req.method_mut() = http::Method::HEAD;
req.headers_mut()
.insert("x-ms-version", "2023-01-03".parse().unwrap());
*req.uri_mut() = http::Uri::from_str(&format!(
"{}/{}",
url,
Expand Down Expand Up @@ -145,6 +148,7 @@ async fn test_list_container_blobs() -> Result<()> {
let mut builder = http::Request::builder();
builder = builder.method(http::Method::GET);
builder = builder.uri(format!("{url}?{query}"));
builder = builder.header("x-ms-version", "2023-01-03");
let mut req = builder.body("")?;

let cred = loader
Expand Down Expand Up @@ -185,6 +189,7 @@ async fn test_can_head_blob_with_sas() -> Result<()> {

let mut builder = http::Request::builder();
builder = builder.method(http::Method::HEAD);
builder = builder.header("x-ms-version", "2023-01-03");
builder = builder.uri(format!("{}/{}", url, "not_exist_file"));
let mut req = builder.body("")?;

Expand Down Expand Up @@ -233,6 +238,7 @@ async fn test_can_list_container_blobs() -> Result<()> {
] {
let mut builder = http::Request::builder();
builder = builder.method(http::Method::GET);
builder = builder.header("x-ms-version", "2023-01-03");
builder = builder.uri(format!("{url}?{query}"));
let mut req = builder.body("")?;

Expand Down Expand Up @@ -287,6 +293,7 @@ async fn test_head_blob_with_ldms() -> Result<()> {

let mut req = http::Request::builder()
.method(http::Method::HEAD)
.header("x-ms-version", "2023-01-03")
.uri(format!("{}/{}", url, "not_exist_file"))
.body("")?;

Expand Down Expand Up @@ -344,6 +351,7 @@ async fn test_can_list_container_blobs_with_ldms() -> Result<()> {
] {
let mut builder = http::Request::builder();
builder = builder.method(http::Method::GET);
builder = builder.header("x-ms-version", "2023-01-03");
builder = builder.uri(format!("{url}?{query}"));
let mut req = builder.body("")?;

Expand Down

1 comment on commit d6388f9

@github-actions
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Deploy preview for reqsign ready!

✅ Preview
https://reqsign-lno8u6zgz-xuanwo.vercel.app

Built with commit d6388f9.
This pull request is being automatically deployed with vercel-action

Please sign in to comment.