Compare commits
2
Commits
919803a2cc
...
d2d0a7c394
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
d2d0a7c394
|
||
|
|
9a6985873c
|
+45
-16
@@ -25,9 +25,11 @@ async fn main() {
|
|||||||
mod tests {
|
mod tests {
|
||||||
use std::io::Write;
|
use std::io::Write;
|
||||||
|
|
||||||
|
/*
|
||||||
use common_multipart_rfc7578::client::multipart::{
|
use common_multipart_rfc7578::client::multipart::{
|
||||||
Body as MultipartBody, Form as MultipartForm,
|
Body as MultipartBody, Form as MultipartForm,
|
||||||
};
|
};
|
||||||
|
*/
|
||||||
use tower::ServiceExt;
|
use tower::ServiceExt;
|
||||||
|
|
||||||
use crate::db;
|
use crate::db;
|
||||||
@@ -1036,7 +1038,17 @@ mod tests {
|
|||||||
match app
|
match app
|
||||||
.clone()
|
.clone()
|
||||||
.oneshot(
|
.oneshot(
|
||||||
request::run_post(Some(request::ReqBody::Multipart(("flac".to_string(), songpath))), &uri, axum::http::Method::PATCH, true).await.unwrap()
|
request::run_post(
|
||||||
|
Some(request::ReqBody::Multipart((
|
||||||
|
"flac".to_string(),
|
||||||
|
songpath,
|
||||||
|
))),
|
||||||
|
&uri,
|
||||||
|
axum::http::Method::PATCH,
|
||||||
|
true,
|
||||||
|
)
|
||||||
|
.await
|
||||||
|
.unwrap(),
|
||||||
)
|
)
|
||||||
.await
|
.await
|
||||||
{
|
{
|
||||||
@@ -1517,15 +1529,13 @@ mod tests {
|
|||||||
match app
|
match app
|
||||||
.clone()
|
.clone()
|
||||||
.oneshot(
|
.oneshot(
|
||||||
axum::http::Request::builder()
|
request::run_post(
|
||||||
.method(axum::http::Method::GET)
|
None,
|
||||||
.uri(uri)
|
&uri,
|
||||||
.header(axum::http::header::CONTENT_TYPE, "image/jpeg")
|
axum::http::Method::GET,
|
||||||
.header(
|
false,
|
||||||
axum::http::header::AUTHORIZATION,
|
|
||||||
bearer_auth().await,
|
|
||||||
)
|
)
|
||||||
.body(axum::body::Body::empty())
|
.await
|
||||||
.unwrap(),
|
.unwrap(),
|
||||||
)
|
)
|
||||||
.await
|
.await
|
||||||
@@ -1912,7 +1922,14 @@ mod tests {
|
|||||||
match app
|
match app
|
||||||
.clone()
|
.clone()
|
||||||
.oneshot(
|
.oneshot(
|
||||||
request::run_post(Some(request::ReqBody::Json(payload)), crate::callers::queue::endpoints::QUEUECOVERARTDATAWIPE, axum::http::Method::PATCH, true).await.unwrap()
|
request::run_post(
|
||||||
|
Some(request::ReqBody::Json(payload)),
|
||||||
|
crate::callers::queue::endpoints::QUEUECOVERARTDATAWIPE,
|
||||||
|
axum::http::Method::PATCH,
|
||||||
|
true,
|
||||||
|
)
|
||||||
|
.await
|
||||||
|
.unwrap(),
|
||||||
)
|
)
|
||||||
.await
|
.await
|
||||||
{
|
{
|
||||||
@@ -1980,7 +1997,9 @@ mod tests {
|
|||||||
match app
|
match app
|
||||||
.clone()
|
.clone()
|
||||||
.oneshot(
|
.oneshot(
|
||||||
super::request::run_post(None, &uri, axum::http::Method::GET, false).await.unwrap()
|
super::request::run_post(None, &uri, axum::http::Method::GET, false)
|
||||||
|
.await
|
||||||
|
.unwrap(),
|
||||||
)
|
)
|
||||||
.await
|
.await
|
||||||
{
|
{
|
||||||
@@ -2028,7 +2047,9 @@ mod tests {
|
|||||||
match app
|
match app
|
||||||
.clone()
|
.clone()
|
||||||
.oneshot(
|
.oneshot(
|
||||||
super::request::run_post(None, &uri, axum::http::Method::GET, false).await.unwrap()
|
super::request::run_post(None, &uri, axum::http::Method::GET, false)
|
||||||
|
.await
|
||||||
|
.unwrap(),
|
||||||
)
|
)
|
||||||
.await
|
.await
|
||||||
{
|
{
|
||||||
@@ -2108,7 +2129,9 @@ mod tests {
|
|||||||
match app
|
match app
|
||||||
.clone()
|
.clone()
|
||||||
.oneshot(
|
.oneshot(
|
||||||
super::request::run_post(None, &uri, axum::http::Method::GET, false).await.unwrap()
|
super::request::run_post(None, &uri, axum::http::Method::GET, false)
|
||||||
|
.await
|
||||||
|
.unwrap(),
|
||||||
)
|
)
|
||||||
.await
|
.await
|
||||||
{
|
{
|
||||||
@@ -2160,7 +2183,9 @@ mod tests {
|
|||||||
match app
|
match app
|
||||||
.clone()
|
.clone()
|
||||||
.oneshot(
|
.oneshot(
|
||||||
super::request::run_post(None, &uri, axum::http::Method::GET, false).await.unwrap()
|
super::request::run_post(None, &uri, axum::http::Method::GET, false)
|
||||||
|
.await
|
||||||
|
.unwrap(),
|
||||||
)
|
)
|
||||||
.await
|
.await
|
||||||
{
|
{
|
||||||
@@ -2214,7 +2239,9 @@ mod tests {
|
|||||||
match app
|
match app
|
||||||
.clone()
|
.clone()
|
||||||
.oneshot(
|
.oneshot(
|
||||||
super::request::run_post(None, &uri, axum::http::Method::GET, false).await.unwrap()
|
super::request::run_post(None, &uri, axum::http::Method::GET, false)
|
||||||
|
.await
|
||||||
|
.unwrap(),
|
||||||
)
|
)
|
||||||
.await
|
.await
|
||||||
{
|
{
|
||||||
@@ -2333,7 +2360,9 @@ mod tests {
|
|||||||
match app
|
match app
|
||||||
.clone()
|
.clone()
|
||||||
.oneshot(
|
.oneshot(
|
||||||
super::request::run_post(None, &uri, axum::http::Method::DELETE, false).await.unwrap()
|
super::request::run_post(None, &uri, axum::http::Method::DELETE, false)
|
||||||
|
.await
|
||||||
|
.unwrap(),
|
||||||
)
|
)
|
||||||
.await
|
.await
|
||||||
{
|
{
|
||||||
|
|||||||
Reference in New Issue
Block a user