Merge "Remove map usage via pointers"
authorRastislav Szabo <raszabo@cisco.com>
Thu, 4 Jan 2018 08:31:09 +0000 (08:31 +0000)
committerGerrit Code Review <gerrit@fd.io>
Thu, 4 Jan 2018 08:31:09 +0000 (08:31 +0000)
api/api_test.go

index 64c513c..3e77f48 100644 (file)
@@ -18,7 +18,6 @@ import (
        "testing"
        "time"
 
-       "git.fd.io/govpp.git"
        "git.fd.io/govpp.git/adapter/mock"
        "git.fd.io/govpp.git/api"
        "git.fd.io/govpp.git/core"
@@ -39,12 +38,12 @@ type testCtx struct {
 func setupTest(t *testing.T) *testCtx {
        RegisterTestingT(t)
 
-       ctx := &testCtx{}
-       ctx.mockVpp = &mock.VppAdapter{}
-       govpp.SetAdapter(ctx.mockVpp)
+       ctx := &testCtx{
+               mockVpp: &mock.VppAdapter{},
+       }
 
        var err error
-       ctx.conn, err = govpp.Connect()
+       ctx.conn, err = core.Connect(ctx.mockVpp)
        Expect(err).ShouldNot(HaveOccurred())
 
        ctx.ch, err = ctx.conn.NewAPIChannel()