fix(protocols): return errors instead of panics for sync signatures (#2120)

Co-authored-by: houseme <housemecn@gmail.com>
Co-authored-by: heihutu <30542132+heihutu@users.noreply.github.com>
This commit is contained in:
安正超
2026-03-11 11:22:20 +08:00
committed by GitHub
parent 4b480727d6
commit 9908a44c38
2 changed files with 14 additions and 11 deletions
@@ -53,8 +53,8 @@ fn test_sync_signatures() {
let path = "/v1/AUTH_test/container/object.txt";
let key = "sharedsecret";
let sig1 = sync::generate_sync_signature(path, key);
let sig2 = sync::generate_sync_signature(path, key);
let sig1 = sync::generate_sync_signature(path, key).expect("failed to generate sync signature");
let sig2 = sync::generate_sync_signature(path, key).expect("failed to generate sync signature");
assert_eq!(sig1, sig2);
assert_eq!(sig1.len(), 40); // HMAC-SHA1 = 40 hex chars