channeldb: ensure the cleanUp func is always run during tests

This commit is contained in:
Olaoluwa Osuntokun committed 2016-12-27 16:43:17 -08:00
1 parent 326c62c6b5
commit 587bde5636
4 files changed
+15 -15

No files matched your search

+1 -1
View File
@@ -33,10 +33,10 @@ func randInvoice(value btcutil.Amount) (*Invoice, error) {
func TestInvoiceWorkflow(t *testing.T) {
db, cleanUp, err := makeTestDB()
defer cleanUp()
if err != nil {
t.Fatalf("unable to make test db: %v", err)
}
defer cleanUp()
// Create a fake invoice which we'll use several times in the tests
// below.