From faf9792df89ebd60c16f13d49d22d6ea13868b1d Mon Sep 17 00:00:00 2001 From: Adam Korczynski Date: Tue, 18 Jun 2024 14:15:01 +0100 Subject: [PATCH] add comment to UnsafeSetRefTime Signed-off-by: Adam Korczynski --- metadata/updater/updater.go | 3 +++ 1 file changed, 3 insertions(+) diff --git a/metadata/updater/updater.go b/metadata/updater/updater.go index 19fbf86d..68333c82 100644 --- a/metadata/updater/updater.go +++ b/metadata/updater/updater.go @@ -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 }