From a4f643315849724fd7829ad16e84984e4a67e25d Mon Sep 17 00:00:00 2001 From: Erwan Guyader Date: Wed, 4 Nov 2026 11:50:53 +0100 Subject: [PATCH] test: Build TOS dates in UTC in lifecycle tests `ParseTOSVersion` reads the date of a TOS version as midnight UTC, but the `CheckTOSNotSigned` test built its versions from the local date. On a machine ahead of UTC, right after local midnight, the latest version is then still in the future and the test gets `TOSWarning` instead of `TOSBlocked`. Build the dates from the current UTC time so the test passes in any time zone and at any time of day. Co-Authored-By: AI --- model/instance/lifecycle/lifecycle_test.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/model/instance/lifecycle/lifecycle_test.go b/model/instance/lifecycle/lifecycle_test.go index c75f353e12c..ff0408541e4 100644 --- a/model/instance/lifecycle/lifecycle_test.go +++ b/model/instance/lifecycle/lifecycle_test.go @@ -448,7 +448,7 @@ func TestLifecycle(t *testing.T) { }) t.Run("CheckTOSNotSigned", func(t *testing.T) { - now := time.Now() + now := time.Now().UTC() i, err := createInstance(t, &lifecycle.Options{ Domain: "tos.test.cozycloud.cc", Locale: "en",