Skip to content

Commit

Permalink
fix osd test
Browse files Browse the repository at this point in the history
Signed-off-by: Harsh Desai <[email protected]>
  • Loading branch information
Harsh Desai committed Aug 22, 2019
1 parent 8e66e99 commit 48f874b
Showing 1 changed file with 15 additions and 9 deletions.
24 changes: 15 additions & 9 deletions cmd/osd/main.go
Original file line number Diff line number Diff line change
Expand Up @@ -32,12 +32,13 @@ import (
"strconv"
"strings"

"github.com/sirupsen/logrus"

"github.com/codegangsta/cli"
"github.com/docker/docker/pkg/reexec"
"github.com/golang/mock/gomock"
"github.com/kubernetes-csi/csi-test/utils"
"github.com/libopenstorage/openstorage/api"
"github.com/libopenstorage/openstorage/api/flexvolume"
mockapi "github.com/libopenstorage/openstorage/api/mock"
"github.com/libopenstorage/openstorage/api/server"
"github.com/libopenstorage/openstorage/api/server/sdk"
osdcli "github.com/libopenstorage/openstorage/cli"
Expand All @@ -59,6 +60,7 @@ import (
"github.com/portworx/kvdb/consul"
etcd "github.com/portworx/kvdb/etcd/v2"
"github.com/portworx/kvdb/mem"
"github.com/sirupsen/logrus"
)

var (
Expand Down Expand Up @@ -477,16 +479,20 @@ func start(c *cli.Context) error {
return fmt.Errorf("Unable to Initialise Storage Policy Manager Instances %v", err)
}

poolServer := mockapi.NewMockOpenStoragePoolServer(gomock.NewController(
&utils.SafeGoroutineTester{}))

// Start SDK Server for this driver
os.Remove(sdksocket)
sdkServer, err := sdk.New(&sdk.ServerConfig{
Net: "tcp",
Address: ":" + c.String("sdkport"),
RestPort: c.String("sdkrestport"),
Socket: sdksocket,
DriverName: d,
Cluster: cm,
StoragePolicy: sp,
Net: "tcp",
Address: ":" + c.String("sdkport"),
RestPort: c.String("sdkrestport"),
Socket: sdksocket,
DriverName: d,
Cluster: cm,
StoragePolicy: sp,
StoragePoolServer: poolServer,
Security: &sdk.SecurityConfig{
Role: rm,
Tls: tlsConfig,
Expand Down

0 comments on commit 48f874b

Please sign in to comment.