aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorOndrej Fabry <ofabry@cisco.com>2017-12-13 14:09:42 +0100
committerOndrej Fabry <ofabry@cisco.com>2017-12-13 14:13:07 +0100
commit8c63ab9ebee218b7e1c5fcf17594d76348b9f726 (patch)
tree97076a407d64ae5f334941f7eb2e5107c4d07c0d
parentde8e6592e23a3819266cea5e9999c7c21fdd826f (diff)
Use core directly in tests to avoid need of vppapiclient library
Change-Id: I1fa534129ee7e04eb5058a215fa7eabfe1ecc2bf Signed-off-by: Ondrej Fabry <ofabry@cisco.com>
-rw-r--r--api/api_test.go9
1 files changed, 4 insertions, 5 deletions
diff --git a/api/api_test.go b/api/api_test.go
index 64c513c..3e77f48 100644
--- a/api/api_test.go
+++ b/api/api_test.go
@@ -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()