mirror of
https://github.com/rcourtman/Pulse.git
synced 2026-10-24 04:33:17 +00:00
Compare the renewed licence expiry in UTC in its test
TestProviderMSPLicenseRefreshAppliesShorterPaidPeriod compared the
refresher's UTC expiry ("...Z") with the expected time formatted in the
machine's local zone ("...+01:00"), so it failed on any machine not set
to UTC, including a maintainer Mac on British Summer Time, while CI in
UTC passed. Format the expectation in UTC. It now passes under
Europe/London, America/Los_Angeles and UTC.
This commit is contained in:
@@ -230,7 +230,7 @@ func TestProviderMSPLicenseRefreshAppliesShorterPaidPeriod(t *testing.T) {
|
||||
refresher.SetRestart(func() { restarted <- struct{}{} })
|
||||
|
||||
result, err := refresher.Refresh(context.Background())
|
||||
if err != nil || !result.Changed || !result.RestartScheduled || result.ExpiresAt != shorterExpiry.Format(time.RFC3339) {
|
||||
if err != nil || !result.Changed || !result.RestartScheduled || result.ExpiresAt != shorterExpiry.UTC().Format(time.RFC3339) {
|
||||
t.Fatalf("shorter paid-period refresh = %+v, %v", result, err)
|
||||
}
|
||||
installed, err := os.ReadFile(ProviderMSPRenewedLicensePath(cfg.DataDir))
|
||||
|
||||
Reference in New Issue
Block a user