mirror of
https://git.deuxfleurs.fr/Deuxfleurs/garage.git
synced 2024-11-21 23:51:00 +00:00
fix test_website_check_domain
This commit is contained in:
parent
e66c78d6ea
commit
769b6fe054
1 changed files with 9 additions and 9 deletions
|
@ -440,13 +440,13 @@ async fn test_website_check_domain() {
|
||||||
};
|
};
|
||||||
|
|
||||||
let admin_resp = client.request(admin_req()).await.unwrap();
|
let admin_resp = client.request(admin_req()).await.unwrap();
|
||||||
assert_eq!(admin_resp.status(), StatusCode::NOT_FOUND);
|
assert_eq!(admin_resp.status(), StatusCode::BAD_REQUEST);
|
||||||
let res_body = json_body(admin_resp).await;
|
let res_body = json_body(admin_resp).await;
|
||||||
assert_json_eq!(
|
assert_json_eq!(
|
||||||
res_body,
|
res_body,
|
||||||
json!({
|
json!({
|
||||||
"code": "NoSuchBucket",
|
"code": "InvalidRequest",
|
||||||
"message": "Bucket not found: ",
|
"message": "Bad request: Domain '' is not managed by Garage",
|
||||||
"region": "garage-integ-test",
|
"region": "garage-integ-test",
|
||||||
"path": "/check",
|
"path": "/check",
|
||||||
})
|
})
|
||||||
|
@ -464,13 +464,13 @@ async fn test_website_check_domain() {
|
||||||
};
|
};
|
||||||
|
|
||||||
let admin_resp = client.request(admin_req()).await.unwrap();
|
let admin_resp = client.request(admin_req()).await.unwrap();
|
||||||
assert_eq!(admin_resp.status(), StatusCode::NOT_FOUND);
|
assert_eq!(admin_resp.status(), StatusCode::BAD_REQUEST);
|
||||||
let res_body = json_body(admin_resp).await;
|
let res_body = json_body(admin_resp).await;
|
||||||
assert_json_eq!(
|
assert_json_eq!(
|
||||||
res_body,
|
res_body,
|
||||||
json!({
|
json!({
|
||||||
"code": "NoSuchBucket",
|
"code": "InvalidRequest",
|
||||||
"message": "Bucket not found: foobar",
|
"message": "Bad request: Domain 'foobar' is not managed by Garage",
|
||||||
"region": "garage-integ-test",
|
"region": "garage-integ-test",
|
||||||
"path": "/check",
|
"path": "/check",
|
||||||
})
|
})
|
||||||
|
@ -488,13 +488,13 @@ async fn test_website_check_domain() {
|
||||||
};
|
};
|
||||||
|
|
||||||
let admin_resp = client.request(admin_req()).await.unwrap();
|
let admin_resp = client.request(admin_req()).await.unwrap();
|
||||||
assert_eq!(admin_resp.status(), StatusCode::NOT_FOUND);
|
assert_eq!(admin_resp.status(), StatusCode::BAD_REQUEST);
|
||||||
let res_body = json_body(admin_resp).await;
|
let res_body = json_body(admin_resp).await;
|
||||||
assert_json_eq!(
|
assert_json_eq!(
|
||||||
res_body,
|
res_body,
|
||||||
json!({
|
json!({
|
||||||
"code": "NoSuchBucket",
|
"code": "InvalidRequest",
|
||||||
"message": "Bucket not found: ☹",
|
"message": "Bad request: Domain '☹' is not managed by Garage",
|
||||||
"region": "garage-integ-test",
|
"region": "garage-integ-test",
|
||||||
"path": "/check",
|
"path": "/check",
|
||||||
})
|
})
|
||||||
|
|
Loading…
Reference in a new issue