mirror of
https://github.com/aljazceru/kata-containers.git
synced 2026-01-15 20:34:19 +01:00
Fixes: #5993 Several tests utilize linux'isms like Mounts, bindmounts, vsock etc. Let's ensure that these are still tested on Linux, but that we also skip these tests when on other operating systems (Darwin). This commit just moves tests; there shouldn't be any functional test changes. While the tests still won't be runnable on Darwin/other hosts yet, this is a necessary step forward. Signed-off-by: Eric Ernst <eric_ernst@apple.com> Signed-off-by: Danny Canter <danny@dcantah.dev>
37 lines
770 B
Go
37 lines
770 B
Go
// Copyright (c) 2018 HyperHQ Inc.
|
|
//
|
|
// SPDX-License-Identifier: Apache-2.0
|
|
//
|
|
|
|
package virtcontainers
|
|
|
|
import (
|
|
"testing"
|
|
|
|
"github.com/kata-containers/kata-containers/src/runtime/virtcontainers/utils"
|
|
"github.com/stretchr/testify/assert"
|
|
)
|
|
|
|
func TestVMConfigGrpc(t *testing.T) {
|
|
assert := assert.New(t)
|
|
config := VMConfig{
|
|
HypervisorType: QemuHypervisor,
|
|
HypervisorConfig: newQemuConfig(),
|
|
AgentConfig: KataAgentConfig{
|
|
LongLiveConn: true,
|
|
Debug: false,
|
|
Trace: false,
|
|
EnableDebugConsole: false,
|
|
ContainerPipeSize: 0,
|
|
KernelModules: []string{}},
|
|
}
|
|
|
|
p, err := config.ToGrpc()
|
|
assert.Nil(err)
|
|
|
|
config2, err := GrpcToVMConfig(p)
|
|
assert.Nil(err)
|
|
|
|
assert.True(utils.DeepCompare(config, *config2))
|
|
}
|