mirror of
				https://github.com/aclindsa/moneygo.git
				synced 2025-11-03 18:13:27 -05:00 
			
		
		
		
	testing: Error on teardown failures
This commit is contained in:
		@@ -164,7 +164,12 @@ func RunWith(t *testing.T, d *TestData, fn TestDataFunc) {
 | 
				
			|||||||
	if err != nil {
 | 
						if err != nil {
 | 
				
			||||||
		t.Fatal("Failed to initialize test data: %s", err)
 | 
							t.Fatal("Failed to initialize test data: %s", err)
 | 
				
			||||||
	}
 | 
						}
 | 
				
			||||||
	defer testdata.Teardown()
 | 
						defer func() {
 | 
				
			||||||
 | 
							err := testdata.Teardown()
 | 
				
			||||||
 | 
							if err != nil {
 | 
				
			||||||
 | 
								t.Fatal(err)
 | 
				
			||||||
 | 
							}
 | 
				
			||||||
 | 
						}()
 | 
				
			||||||
 | 
					
 | 
				
			||||||
	fn(t, testdata)
 | 
						fn(t, testdata)
 | 
				
			||||||
}
 | 
					}
 | 
				
			||||||
 
 | 
				
			|||||||
		Reference in New Issue
	
	Block a user