Skip to content

Commit faf9792

Browse files
committed
add comment to UnsafeSetRefTime
Signed-off-by: Adam Korczynski <[email protected]>
1 parent de4dcfc commit faf9792

File tree

1 file changed

+3
-0
lines changed

1 file changed

+3
-0
lines changed

metadata/updater/updater.go

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -662,6 +662,9 @@ func (update *Updater) GetTrustedMetadataSet() trustedmetadata.TrustedMetadata {
662662
return *update.trusted
663663
}
664664

665+
// Sets the reference time that the updater uses.
666+
// This should only be done in tests.
667+
// UnsafeSetRefTime is useful when testing time-related behavior in go-tuf.
665668
func (update *Updater) UnsafeSetRefTime(t time.Time) {
666669
update.trusted.RefTime = t
667670
}

0 commit comments

Comments
 (0)