Skip to content

Commit

Permalink
storagetesting: added Close()
Browse files Browse the repository at this point in the history
  • Loading branch information
jkowalski committed Oct 27, 2018
1 parent 4237bbc commit 7196891
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions internal/storagetesting/verify.go
Expand Up @@ -64,7 +64,7 @@ func VerifyStorage(ctx context.Context, t *testing.T, r storage.Storage) {

// AssertConnectionInfoRoundTrips verifies that the ConnectionInfo returned by a given storage can be used to create
// equivalent storage
func AssertConnectionInfoRoundTrips(ctx context.Context, t *testing.T, s storage.Storage) storage.Storage {
func AssertConnectionInfoRoundTrips(ctx context.Context, t *testing.T, s storage.Storage) {
t.Helper()

ci := s.ConnectionInfo()
Expand All @@ -78,5 +78,7 @@ func AssertConnectionInfoRoundTrips(ctx context.Context, t *testing.T, s storage
t.Errorf("connection info does not round-trip: %v vs %v", ci, ci2)
}

return s2
if err := s2.Close(ctx); err != nil {
t.Errorf("unable to close storage: %v", err)
}
}

0 comments on commit 7196891

Please sign in to comment.