test: add edge-case tests for gpgkeystate and passwordconfig#1495
Conversation
gpgkeystate (17 → 23 tests): - multipleUidRecordsOnlyFirstNameUsed: only the first uid record sets name - pubRecordDoesNotSetHaveSecret: pub never sets have_secret, even with secret=true - secRecordSetsHaveSecretOnlyWhenSecretTrue: sec sets have_secret iff secret=true - createdDateParsedFromEpoch: pub created timestamp round-trips through epoch - expiryDateParsedFromEpoch: pub expiry timestamp round-trips through epoch - fprWithEmptyKeyIdIsNoop: fpr guard prevents update when key_id is empty passwordconfig (6 → 11 tests): - charsetCountIsCorrect: CHARSETS_COUNT == 4 - alphanumericContainsNoSpecialChars: every char passes isLetterOrNumber() - alphabeticalContainsNoDigits: every char passes isLetter() - customCharsDefaultMatchAllChars: CUSTOM initially equals ALLCHARS Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
|
No actionable comments were generated in the recent review. 🎉 ℹ️ Recent review info⚙️ Run configurationConfiguration used: Repository UI (base), Organization UI (inherited) Review profile: ASSERTIVE Plan: Pro Run ID: 📒 Files selected for processing (2)
📝 WalkthroughWalkthroughThis PR extends two independent test suites with new Qt test slots. The gpgkeystate tests validate GPG colon-output parsing for multiple UIDs, pub/sec record behavior, epoch date conversions, and FPR record handling. The passwordconfig tests validate charset constants and verify generated charset content meets expected invariants. ChangesGPG Key State Parsing Tests
Password Configuration Tests
Estimated code review effort🎯 2 (Simple) | ⏱️ ~10 minutes Possibly related PRs
Suggested labels
Poem
🚥 Pre-merge checks | ✅ 4 | ❌ 1❌ Failed checks (1 warning)
✅ Passed checks (4 passed)
✏️ Tip: You can configure your own custom pre-merge checks in the settings. ✨ Finishing Touches📝 Generate docstrings
🧪 Generate unit tests (beta)
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. Comment |
Summary
gpgkeystate (17 → 23 tests):
uidrecords: only the first sets the name (guards theisEmpty()check)pubrecord never setshave_secret, even whensecret=trueis passedsecrecord setshave_secretonly whensecret=true; false otherwisefprrecord with emptykey_idis a no-op (guards the!isEmpty()check)passwordconfig (6 → 11 tests):
CHARSETS_COUNTequals 4 (enum sentinel value)ALPHANUMERICcontains only chars satisfyingisLetterOrNumber()ALPHABETICALcontains only chars satisfyingisLetter()CUSTOMdefaults to the same content asALLCHARSTest plan
make checkpasses locally: gpgkeystate 22/22, passwordconfig 11/11, 0 failuresclang-format --style=fileapplied🤖 Generated with Claude Code
Summary by CodeRabbit
Release Notes