network: Add test for VhostUserEndpoint Attach()

Fixes #455

Signed-off-by: Archana Shinde <archana.m.shinde@intel.com>
This commit is contained in:
Archana Shinde 2018-06-29 17:57:31 -07:00
parent 93775487c8
commit 150bcafc20

View File

@ -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)
}
}