Skip to content

Commit

Permalink
Merge pull request #53 from przemeklal/fix_vpp_test
Browse files Browse the repository at this point in the history
Fix VPP ipAddDel test
  • Loading branch information
garyloug authored Oct 14, 2020
2 parents aa2bb3c + 52f0cf0 commit 163a160
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions cnivpp/test/ipAddDel/ipAddDel.go
Original file line number Diff line number Diff line change
Expand Up @@ -27,12 +27,12 @@ import (
"time"

_ "git.fd.io/govpp.git/core"
"github.com/containernetworking/cni/pkg/types/current"
_ "github.com/sirupsen/logrus"

"github.com/intel/userspace-cni-network-plugin/cnivpp/api/infra"
"github.com/intel/userspace-cni-network-plugin/cnivpp/api/interface"
"github.com/intel/userspace-cni-network-plugin/cnivpp/api/memif"
"github.com/intel/userspace-cni-network-plugin/pkg/types"
)

//
Expand Down Expand Up @@ -60,7 +60,7 @@ func main() {

// Dummy Input Data
var ipString string = "192.168.172.100/24"
var ipData types.IPDataType
var ipResult *current.Result
var memifSocketId uint32
var memifSocketFile string = "/var/run/vpp/123456/memif-3.sock"
var memifRole vppmemif.MemifRole = vppmemif.RoleMaster
Expand Down Expand Up @@ -112,7 +112,7 @@ func main() {
}

// Add IP to MemIf to Bridge.
err = vppinterface.AddDelIpAddress(vppCh.Ch, swIfIndex, 1, ipData)
err = vppinterface.AddDelIpAddress(vppCh.Ch, swIfIndex, 1, ipResult)
if err != nil {
fmt.Println("Error:", err)
os.Exit(1)
Expand All @@ -125,7 +125,7 @@ func main() {
fmt.Println("User Space VPP client wakeup.")

// Remove IP from MemIf.
err = vppinterface.AddDelIpAddress(vppCh.Ch, swIfIndex, 0, ipData)
err = vppinterface.AddDelIpAddress(vppCh.Ch, swIfIndex, 0, ipResult)

if err != nil {
fmt.Println("Error:", err)
Expand Down

0 comments on commit 163a160

Please sign in to comment.