mirror of
https://github.com/rustfs/rustfs.git
synced 2026-08-29 08:27:06 +00:00
test(credentials): cover URL-safe secret keys (#2524)
This commit is contained in:
@@ -474,6 +474,16 @@ mod tests {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
#[test]
|
||||||
|
fn test_gen_secret_key_uses_url_safe_base64_without_padding() {
|
||||||
|
let key = gen_secret_key(32).expect("secret key should generate");
|
||||||
|
|
||||||
|
assert_eq!(key.len(), 32);
|
||||||
|
assert!(!key.contains('/'));
|
||||||
|
assert!(!key.contains('+'));
|
||||||
|
assert!(!key.contains('='));
|
||||||
|
}
|
||||||
|
|
||||||
#[test]
|
#[test]
|
||||||
fn test_masked_debug() {
|
fn test_masked_debug() {
|
||||||
// Test None
|
// Test None
|
||||||
|
|||||||
Reference in New Issue
Block a user