diff --git a/web/web_test.go b/web/web_test.go index cc33e1e8e..8f6be1015 100644 --- a/web/web_test.go +++ b/web/web_test.go @@ -468,7 +468,7 @@ func TestHTTPMetrics(t *testing.T) { func TestShutdownWithStaleConnection(t *testing.T) { dbDir, err := ioutil.TempDir("", "tsdb-ready") testutil.Ok(t, err) - defer testutil.Ok(t, os.RemoveAll(dbDir)) + defer func() { testutil.Ok(t, os.RemoveAll(dbDir)) }() db, err := tsdb.Open(dbDir, nil, nil, nil) testutil.Ok(t, err)