[#137] metabase: Implement Path method

Signed-off-by: Leonard Lyubich <leonard@nspcc.ru>
This commit is contained in:
Leonard Lyubich 2020-11-02 10:37:16 +03:00 committed by Alex Vanin
parent 8125b544b4
commit fc2038e929
2 changed files with 24 additions and 0 deletions

View file

@ -236,3 +236,19 @@ func TestDB_SelectProperties(t *testing.T) {
fs.AddFilter(v2object.FilterPropertyChildfree, "some false value", objectSDK.MatchStringEqual)
testSelect(t, db, fs, lnkAddr)
}
func TestDB_Path(t *testing.T) {
path := t.Name()
bdb, err := bbolt.Open(path, 0600, nil)
require.NoError(t, err)
defer func() {
bdb.Close()
os.Remove(path)
}()
db := NewDB(bdb)
require.Equal(t, path, db.Path())
}