Skip to content
This repository was archived by the owner on Aug 13, 2019. It is now read-only.

Commit 2bf06bf

Browse files
use openTestDB for the test.
1 parent 3ab5105 commit 2bf06bf

File tree

1 file changed

+3
-6
lines changed

1 file changed

+3
-6
lines changed

db_test.go

Lines changed: 3 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -752,16 +752,13 @@ func TestTombstoneClean(t *testing.T) {
752752
}
753753

754754
func TestDB_Retention(t *testing.T) {
755-
tmpdir, _ := ioutil.TempDir("", "test")
756-
defer os.RemoveAll(tmpdir)
757-
758-
db, err := Open(tmpdir, nil, nil, nil)
759-
testutil.Ok(t, err)
755+
db, close := openTestDB(t, nil)
756+
defer close()
760757

761758
lbls := labels.Labels{labels.Label{Name: "labelname", Value: "labelvalue"}}
762759

763760
app := db.Appender()
764-
_, err = app.Add(lbls, 0, 1)
761+
_, err := app.Add(lbls, 0, 1)
765762
testutil.Ok(t, err)
766763
testutil.Ok(t, app.Commit())
767764

0 commit comments

Comments
 (0)