From e79a99425dd03a7e7f373a91ffeec2f5cbb8eaf0 Mon Sep 17 00:00:00 2001 From: Iliya Lyan <68940374+12ya@users.noreply.github.com> Date: Sat, 25 Oct 2025 00:55:50 +0900 Subject: [PATCH] push/push_test: Use t.Fatal for pointer nil checks Replaces t.Error with t.Fatal in NewRegistry and NewProcessor tests to immediately stop test execution when a nil value is encountered. --- push/push_test.go | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/push/push_test.go b/push/push_test.go index 69126f3028..b98b5f1626 100644 --- a/push/push_test.go +++ b/push/push_test.go @@ -144,7 +144,7 @@ func TestRegistry(t *testing.T) { t.Run("NewRegistry", func(t *testing.T) { registry := NewRegistry() if registry == nil { - t.Error("NewRegistry should not return nil") + t.Fatal("NewRegistry should not return nil") } if registry.handlers == nil { @@ -407,7 +407,7 @@ func TestProcessor(t *testing.T) { t.Run("NewProcessor", func(t *testing.T) { processor := NewProcessor() if processor == nil { - t.Error("NewProcessor should not return nil") + t.Fatal("NewProcessor should not return nil") } if processor.registry == nil {