[#1255] node/session: Create separate dir for in-memory storage

Move in-memory session storage to the separate directory of `storage`. It is
done for future support of different kind of session storages.

Signed-off-by: Pavel Karpy <carpawell@nspcc.ru>
This commit is contained in:
Pavel Karpy 2022-03-18 11:46:07 +03:00 committed by Alex Vanin
parent 2a69aaf976
commit 929c9851a6
7 changed files with 36 additions and 19 deletions

View file

@ -9,7 +9,7 @@ import (
"github.com/nspcc-dev/neo-go/pkg/crypto/keys"
sessionV2 "github.com/nspcc-dev/neofs-api-go/v2/session"
"github.com/nspcc-dev/neofs-node/pkg/services/object/util"
tokenStorage "github.com/nspcc-dev/neofs-node/pkg/services/session/storage"
tokenStorage "github.com/nspcc-dev/neofs-node/pkg/services/session/storage/temporary"
"github.com/nspcc-dev/neofs-sdk-go/session"
"github.com/stretchr/testify/require"
)
@ -18,7 +18,7 @@ func TestNewKeyStorage(t *testing.T) {
nodeKey, err := keys.NewPrivateKey()
require.NoError(t, err)
tokenStor := tokenStorage.New()
tokenStor := tokenStorage.NewTokenStore()
stor := util.NewKeyStorage(&nodeKey.PrivateKey, tokenStor, mockedNetworkState{42})
t.Run("node key", func(t *testing.T) {