mirror of
https://github.com/kata-containers/kata-containers.git
synced 2025-08-12 13:22:28 +00:00
clh: clh http unit test
Add initial unit test around http client Signed-off-by: Jose Carlos Venegas Munoz <jose.carlos.venegas.munoz@intel.com>
This commit is contained in:
parent
42061f6c39
commit
0afeb527ff
@ -4,3 +4,21 @@
|
|||||||
//
|
//
|
||||||
|
|
||||||
package virtcontainers
|
package virtcontainers
|
||||||
|
|
||||||
|
import (
|
||||||
|
"github.com/stretchr/testify/assert"
|
||||||
|
"testing"
|
||||||
|
)
|
||||||
|
|
||||||
|
func TestCloudHypervisorAddVSock(t *testing.T) {
|
||||||
|
assert := assert.New(t)
|
||||||
|
clh := cloudHypervisor{}
|
||||||
|
|
||||||
|
clh.addVSock(1, "path")
|
||||||
|
assert.Equal(clh.vmconfig.Vsock[0].Cid, int64(1))
|
||||||
|
assert.Equal(clh.vmconfig.Vsock[0].Sock, "path")
|
||||||
|
|
||||||
|
clh.addVSock(2, "path2")
|
||||||
|
assert.Equal(clh.vmconfig.Vsock[1].Cid, int64(2))
|
||||||
|
assert.Equal(clh.vmconfig.Vsock[1].Sock, "path2")
|
||||||
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user