libnetwork: TestBoltdbBackend(): use t.TempDir()
Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
This commit is contained in:
parent
2fd88c7ca4
commit
6944d2dddb
1 changed files with 5 additions and 3 deletions
|
@ -2,6 +2,7 @@ package libnetwork
|
|||
|
||||
import (
|
||||
"os"
|
||||
"path/filepath"
|
||||
"testing"
|
||||
|
||||
"github.com/docker/docker/libnetwork/datastore"
|
||||
|
@ -11,9 +12,10 @@ import (
|
|||
func TestBoltdbBackend(t *testing.T) {
|
||||
defer os.Remove(datastore.DefaultScope("").Client.Address)
|
||||
testLocalBackend(t, "", "", nil)
|
||||
defer os.Remove("/tmp/boltdb.db")
|
||||
config := &store.Config{Bucket: "testBackend"}
|
||||
testLocalBackend(t, "boltdb", "/tmp/boltdb.db", config)
|
||||
tmpPath := filepath.Join(t.TempDir(), "boltdb.db")
|
||||
testLocalBackend(t, "boltdb", tmpPath, &store.Config{
|
||||
Bucket: "testBackend",
|
||||
})
|
||||
}
|
||||
|
||||
func TestNoPersist(t *testing.T) {
|
||||
|
|
Loading…
Add table
Reference in a new issue