Skip to content

Commit a3a369b

Browse files
authored
chore(tests): Use t.Fatal for pointer nil checks (#3562)
Replaces t.Error with t.Fatal in NewRegistry and NewProcessor tests to immediately stop test execution when a nil value is encountered.
1 parent 4bc1836 commit a3a369b

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

push/push_test.go

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -144,7 +144,7 @@ func TestRegistry(t *testing.T) {
144144
t.Run("NewRegistry", func(t *testing.T) {
145145
registry := NewRegistry()
146146
if registry == nil {
147-
t.Error("NewRegistry should not return nil")
147+
t.Fatal("NewRegistry should not return nil")
148148
}
149149

150150
if registry.handlers == nil {
@@ -407,7 +407,7 @@ func TestProcessor(t *testing.T) {
407407
t.Run("NewProcessor", func(t *testing.T) {
408408
processor := NewProcessor()
409409
if processor == nil {
410-
t.Error("NewProcessor should not return nil")
410+
t.Fatal("NewProcessor should not return nil")
411411
}
412412

413413
if processor.registry == nil {

0 commit comments

Comments
 (0)