Skip to content
This repository has been archived by the owner on May 12, 2021. It is now read-only.

Commit

Permalink
network: Add test for VhostUserEndpoint Attach()
Browse files Browse the repository at this point in the history
Fixes #455

Signed-off-by: Archana Shinde <[email protected]>
  • Loading branch information
amshinde committed Jun 30, 2018
1 parent 9377548 commit 150bcaf
Showing 1 changed file with 15 additions and 0 deletions.
15 changes: 15 additions & 0 deletions virtcontainers/network_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -473,3 +473,18 @@ func TestVhostUserSocketPath(t *testing.T) {
}

}

func TestVhostUserEndpointAttach(t *testing.T) {
v := &VhostUserEndpoint{
SocketPath: "/tmp/sock",
HardAddr: "mac-addr",
EndpointType: VhostUserEndpointType,
}

h := &mockHypervisor{}

err := v.Attach(h)
if err != nil {
t.Fatal(err)
}
}

0 comments on commit 150bcaf

Please sign in to comment.