Commit 655b0af
test(encryption): strengthen testCalculateFolderSizeWithEncryptedZeroByte
Add a second encrypted child with unencrypted_size=100 so the write-back
gate in calculateFolderSizeInner ($unencryptedMax > 0) actually opens.
The original single zero-byte child left the gate closed, meaning the
test passed against the DB default rather than the computed value.
With two children the assertion distinguishes the fixed code (result: 100)
from the old buggy code (result: 8292, falling back to on-disk size for
the zero-byte child).
Assisted-by: ClaudeCode:claude-opus-4-6
Signed-off-by: Stephen Cuppett <scuppett@redhat.com>1 parent 2d6a291 commit 655b0af
1 file changed
Lines changed: 18 additions & 7 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
306 | 306 | | |
307 | 307 | | |
308 | 308 | | |
309 | | - | |
310 | | - | |
311 | | - | |
| 309 | + | |
| 310 | + | |
| 311 | + | |
312 | 312 | | |
313 | 313 | | |
314 | 314 | | |
315 | 315 | | |
316 | 316 | | |
317 | 317 | | |
318 | 318 | | |
319 | | - | |
| 319 | + | |
| 320 | + | |
| 321 | + | |
| 322 | + | |
| 323 | + | |
| 324 | + | |
| 325 | + | |
| 326 | + | |
| 327 | + | |
| 328 | + | |
| 329 | + | |
320 | 330 | | |
321 | | - | |
322 | 331 | | |
323 | | - | |
324 | | - | |
| 332 | + | |
| 333 | + | |
| 334 | + | |
| 335 | + | |
325 | 336 | | |
326 | 337 | | |
327 | 338 | | |
| |||
0 commit comments