state: note tagged-path coverage and self-healing behaviour for #3199

- test: comment that the !regReq.Expiry.IsZero() gate also covers
  the tags-only PreAuthKey path
- CHANGELOG: note pre-existing 0001-01-01 rows self-heal on
  re-registration rather than being backfilled
This commit is contained in:
Akhilesh Arora
2026-04-20 15:54:43 +02:00
committed by Kristoffer Dalby
parent bcfaf6ad68
commit de60982d83
2 changed files with 6 additions and 0 deletions
+5
View File
@@ -1126,6 +1126,11 @@ func TestReregistrationAppliesDefaultExpiry(t *testing.T) {
// time. Regression test for the else branch introduced in commit 6337a3db
// which assigned `&regReq.Expiry` (pointer to time.Time{}) instead of nil,
// causing the database row to hold `0001-01-01 00:00:00` instead of NULL.
//
// The same !regReq.Expiry.IsZero() gate at state.go:2221-2228 is shared by
// the tags-only PreAuthKey path (createAndSaveNewNode also receives nil
// when the client sends zero expiry), so this regression is covered for
// tagged nodes by inspection.
func TestReregistrationZeroExpiryStaysNil(t *testing.T) {
t.Parallel()