mirror of
https://github.com/moby/moby.git
synced 2026-08-08 00:52:17 +00:00
libnetwork: TestBoltdbBackend(): use t.TempDir()
Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
This commit is contained in:
@@ -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) {
|
||||
|
||||
Reference in New Issue
Block a user