mirror of
https://github.com/xinnan-tech/xiaozhi-esp32-server.git
synced 2026-11-28 04:59:52 +01:00
test(api): fix maskMiddle expected suffix
maskMiddle keeps a 4-char tail, so the masked '...e123' suffix is the contract, not '...3123'.
This commit is contained in:
parent
934a349cdd
commit
e786e948ec
1 changed files with 1 additions and 1 deletions
|
|
@ -44,7 +44,7 @@ class SensitiveDataUtilsTest {
|
|||
void maskMiddle_keeps_four_at_each_end_for_long_strings() {
|
||||
String masked = SensitiveDataUtils.maskMiddle("verylongapikeyvalue123");
|
||||
assertTrue(masked.startsWith("very"));
|
||||
assertTrue(masked.endsWith("3123"));
|
||||
assertTrue(masked.endsWith("e123"));
|
||||
assertTrue(masked.contains("****"));
|
||||
assertEquals("verylongapikeyvalue123".length(), masked.length());
|
||||
}
|
||||
|
|
|
|||
Loading…
Reference in a new issue