1e36ef252d
This thing is SUPER slow and has some dumb edge cases. It is only really meant for development at this point and is commented as such. We won't document it publicly unless we make it good.
26 lines
378 B
Go
26 lines
378 B
Go
package physical
|
|
|
|
import (
|
|
"io/ioutil"
|
|
"os"
|
|
"testing"
|
|
)
|
|
|
|
func TestFileBackend(t *testing.T) {
|
|
dir, err := ioutil.TempDir("", "vault")
|
|
if err != nil {
|
|
t.Fatalf("err: %s", err)
|
|
}
|
|
defer os.RemoveAll(dir)
|
|
|
|
b, err := NewBackend("file", map[string]string{
|
|
"path": dir,
|
|
})
|
|
if err != nil {
|
|
t.Fatalf("err: %s", err)
|
|
}
|
|
|
|
testBackend(t, b)
|
|
testBackend_ListPrefix(t, b)
|
|
}
|