open-vault/physical/file_test.go
Mitchell Hashimoto 1e36ef252d physical: finish super naive file backend
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.
2015-03-15 20:15:27 -07:00

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)
}