mirror of
				https://github.com/minio/minio.git
				synced 2025-10-29 15:55:00 -04:00 
			
		
		
		
	tests: Fix a bug in TestObjectAPIIsUploadIDExists. (#1375)
The following code crashes when upload ID does not
exist, since we are setting err == nil when we find
err == errFileNotFound.
```
if e == nil {
   t.Fatal(e.Error())
```
Fix it.
			
			
This commit is contained in:
		
							parent
							
								
									6e372f83b4
								
							
						
					
					
						commit
						bf8a9702a4
					
				| @ -106,10 +106,7 @@ func TestObjectAPIIsUploadIDExists(t *testing.T) { | ||||
| 
 | ||||
| 	// UploadID file shouldn't exist. | ||||
| 	isExists, e := obj.isUploadIDExists(bucket, object, "abc") | ||||
| 	if e == nil { | ||||
| 		t.Fatal(e.Error()) | ||||
| 	} | ||||
| 	if isExists { | ||||
| 	if e == nil && isExists { | ||||
| 		t.Fatal("Expected uploadIDPath to not to exist.") | ||||
| 	} | ||||
| 
 | ||||
|  | ||||
		Loading…
	
	
			
			x
			
			
		
	
		Reference in New Issue
	
	Block a user