From e677031973db67b450fea81fb4aacc372375762b Mon Sep 17 00:00:00 2001 From: YASSERRMD Date: Thu, 28 May 2026 23:49:24 +0400 Subject: [PATCH] =?UTF-8?q?test:=20fix=20TestRejectInvalidWindow=20?= =?UTF-8?q?=E2=80=94=20use=20one=20timestamp=20so=20the=20window=20is=20tr?= =?UTF-8?q?uly=20zero-length?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- internal/research/sandbox/provision_test.go | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/internal/research/sandbox/provision_test.go b/internal/research/sandbox/provision_test.go index 4e73fa6..c90d825 100644 --- a/internal/research/sandbox/provision_test.go +++ b/internal/research/sandbox/provision_test.go @@ -14,7 +14,10 @@ func TestProvisionAutomation(t *testing.T) { } func TestRejectInvalidWindow(t *testing.T) { - if err := (Spec{PartnerID: "uni-1", StartAt: time.Now(), EndAt: time.Now(), Tier: "B"}).Validate(); err == nil { + now := time.Now() + // Same instant for start and end == a zero-length window, which + // Validate must reject (end is not strictly after start). + if err := (Spec{PartnerID: "uni-1", StartAt: now, EndAt: now, Tier: "B"}).Validate(); err == nil { t.Fatal("expected error for zero-length window") } }