[upload - http-extra] fix: download content to file when unsuccessful response (and test) #1750 (#1783)

* fix and test

* Update Cargo.toml

Co-authored-by: Fabian-Lars <fabianlars@fabianlars.de>

* Update Cargo.toml

Co-authored-by: Fabian-Lars <fabianlars@fabianlars.de>

* add .change log

* clippy fixes

* print test error

* fix tests

---------

Co-authored-by: Fabian-Lars <fabianlars@fabianlars.de>
Co-authored-by: Lucas Nogueira <lucas@tauri.studio>
This commit is contained in:
Felix Salazar
2024-09-15 23:37:02 +02:00
committed by GitHub
parent 7a37355e17
commit 1d9741b52b
5 changed files with 133 additions and 3 deletions
Generated
+54 -1
View File
@@ -337,6 +337,16 @@ dependencies = [
"zbus",
]
[[package]]
name = "assert-json-diff"
version = "2.0.2"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "47e4f2b81832e72834d7518d8487a0396a28cc408186a2e8854c0f98011faf12"
dependencies = [
"serde",
"serde_json",
]
[[package]]
name = "async-broadcast"
version = "0.7.1"
@@ -1088,6 +1098,16 @@ dependencies = [
"winapi",
]
[[package]]
name = "colored"
version = "2.1.0"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "cbf2150cce219b664a8a70df7a1f933836724b503f8a413af9365b4dcc4d90b8"
dependencies = [
"lazy_static",
"windows-sys 0.48.0",
]
[[package]]
name = "combine"
version = "4.6.7"
@@ -1961,7 +1981,7 @@ version = "0.6.2"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "d9f0c14694cbd524c8720dd69b0e3179344f04ebb5f90f2e4a440c6ea3b2f1ee"
dependencies = [
"colored",
"colored 1.9.4",
"log",
]
@@ -2808,6 +2828,7 @@ dependencies = [
"http",
"http-body",
"httparse",
"httpdate",
"itoa 1.0.11",
"pin-project-lite",
"smallvec",
@@ -3623,6 +3644,30 @@ dependencies = [
"windows-sys 0.52.0",
]
[[package]]
name = "mockito"
version = "1.5.0"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "09b34bd91b9e5c5b06338d392463e1318d683cf82ec3d3af4014609be6e2108d"
dependencies = [
"assert-json-diff",
"bytes",
"colored 2.1.0",
"futures-util",
"http",
"http-body",
"http-body-util",
"hyper",
"hyper-util",
"log",
"rand 0.8.5",
"regex",
"serde_json",
"serde_urlencoded",
"similar",
"tokio",
]
[[package]]
name = "muda"
version = "0.14.1"
@@ -5614,6 +5659,12 @@ version = "0.1.4"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "f27f6278552951f1f2b8cf9da965d10969b2efdea95a6ec47987ab46edfe263a"
[[package]]
name = "similar"
version = "2.6.0"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "1de1d4f81173b03af4c0cbed3c898f6bff5b870e4a7f5d6f4057d62a7a4b686e"
[[package]]
name = "single-instance-example"
version = "0.1.0"
@@ -6811,6 +6862,7 @@ version = "2.0.0-rc.1"
dependencies = [
"futures-util",
"log",
"mockito",
"read-progress-stream",
"reqwest",
"serde",
@@ -7113,6 +7165,7 @@ dependencies = [
"bytes",
"libc",
"mio 1.0.2",
"parking_lot",
"pin-project-lite",
"signal-hook-registry",
"socket2",