mirror of
https://github.com/etcd-io/etcd.git
synced 2024-09-27 06:25:44 +00:00
Make NewTmpBackend use testing tmp location (so cleanup).
This commit is contained in:
@@ -66,7 +66,7 @@ func TestScheduleCompaction(t *testing.T) {
|
||||
},
|
||||
}
|
||||
for i, tt := range tests {
|
||||
b, tmpPath := backend.NewDefaultTmpBackend()
|
||||
b, tmpPath := backend.NewDefaultTmpBackend(t)
|
||||
s := NewStore(zap.NewExample(), b, &lease.FakeLessor{}, nil, StoreConfig{})
|
||||
tx := s.b.BatchTx()
|
||||
|
||||
@@ -100,7 +100,7 @@ func TestScheduleCompaction(t *testing.T) {
|
||||
}
|
||||
|
||||
func TestCompactAllAndRestore(t *testing.T) {
|
||||
b, tmpPath := backend.NewDefaultTmpBackend()
|
||||
b, tmpPath := backend.NewDefaultTmpBackend(t)
|
||||
s0 := NewStore(zap.NewExample(), b, &lease.FakeLessor{}, nil, StoreConfig{})
|
||||
defer os.Remove(tmpPath)
|
||||
|
||||
|
||||
Reference in New Issue
Block a user