mirror of
				https://github.com/redis/go-redis.git
				synced 2025-11-04 02:33:24 +03:00 
			
		
		
		
	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.
This commit is contained in:
		@@ -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 {
 | 
			
		||||
 
 | 
			
		||||
		Reference in New Issue
	
	Block a user