Speedup binstalk-git-repo-api unit testing ()

* Share `remote::Client` between tests when in cargo-test

Signed-off-by: Jiahao XU <Jiahao_XU@outlook.com>

* Run rate-limited binstalk-git-repo-api test in serial

Signed-off-by: Jiahao XU <Jiahao_XU@outlook.com>

* Update client-side rate limit to 1 request per 300ms

Signed-off-by: Jiahao XU <Jiahao_XU@outlook.com>

* Reduce test cases in `rate_limited_test_has_release_artifact_and_download_artifacts`

Signed-off-by: Jiahao XU <Jiahao_XU@outlook.com>

* Add `cargo-nextest` that I forgot

Signed-off-by: Jiahao XU <Jiahao_XU@outlook.com>

* Fix unit testing: Pass auth-token to restful API

to avoid rate limit

Signed-off-by: Jiahao XU <Jiahao_XU@outlook.com>

---------

Signed-off-by: Jiahao XU <Jiahao_XU@outlook.com>
This commit is contained in:
Jiahao XU 2024-06-12 20:34:50 +10:00 committed by GitHub
parent 4d7a91aa4c
commit 6622bf1ae3
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
7 changed files with 75 additions and 35 deletions

1
Cargo.lock generated
View file

@ -354,6 +354,7 @@ version = "0.0.0"
dependencies = [
"binstalk-downloader",
"compact_str",
"once_cell",
"percent-encoding",
"serde",
"serde-tuple-vec-map",