Merge pull request #456 from amshinde/test-vhost-user-attach

network: Add test for VhostUserEndpoint Attach()
This commit is contained in:
Graham Whaley
2018-07-02 10:07:08 +01:00
committed by GitHub

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