open-vault/logical/plugin/storage_test.go
Brian Kassouf 524b65cb9b
Remove netRPC based plugins (#6173)
* Remove netRPC backend plugins

* Remove netRPC database plugins

* Fix tests and comments
2019-02-12 09:31:03 -08:00

31 lines
630 B
Go

package plugin
import (
"testing"
"google.golang.org/grpc"
plugin "github.com/hashicorp/go-plugin"
"github.com/hashicorp/vault/logical"
"github.com/hashicorp/vault/logical/plugin/pb"
)
func TestStorage_impl(t *testing.T) {
var _ logical.Storage = new(GRPCStorageClient)
}
func TestStorage_GRPC(t *testing.T) {
storage := &logical.InmemStorage{}
client, _ := plugin.TestGRPCConn(t, func(s *grpc.Server) {
pb.RegisterStorageServer(s, &GRPCStorageServer{
impl: storage,
})
})
defer client.Close()
testStorage := &GRPCStorageClient{client: pb.NewStorageClient(client)}
logical.TestStorage(t, testStorage)
}