mirror of
https://github.com/aljazceru/kata-containers.git
synced 2025-12-22 16:54:25 +01:00
network: Add test for VhostUserEndpoint Attach()
Fixes #455 Signed-off-by: Archana Shinde <archana.m.shinde@intel.com>
This commit is contained in:
@@ -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)
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user