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:
rcourtman
2026-09-24 09:22:17 +01:00
parent c081a7b185
commit b815ea141e
@@ -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))