mirror of
https://github.com/kata-containers/kata-containers.git
synced 2025-06-28 16:27:50 +00:00
network: Add test for VhostUserEndpoint Attach()
Fixes #455 Signed-off-by: Archana Shinde <archana.m.shinde@intel.com>
This commit is contained in:
parent
93775487c8
commit
150bcafc20
@ -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)
|
||||||
|
}
|
||||||
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user