Skip to content

Commit

Permalink
add comment to UnsafeSetRefTime
Browse files Browse the repository at this point in the history
Signed-off-by: Adam Korczynski <[email protected]>
  • Loading branch information
AdamKorcz committed Jun 18, 2024
1 parent de4dcfc commit faf9792
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions metadata/updater/updater.go
Original file line number Diff line number Diff line change
Expand Up @@ -662,6 +662,9 @@ func (update *Updater) GetTrustedMetadataSet() trustedmetadata.TrustedMetadata {
return *update.trusted
}

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

0 comments on commit faf9792

Please sign in to comment.