mirror of
https://github.com/aljazceru/kata-containers.git
synced 2025-12-18 23:04:20 +01:00
katautils: don't do validation when loading hypervisor config
Policy for whats valid/invalid within the config varies by VMM, host, and by silicon architecture. Let's keep katautils simple for just translating a toml to the hypervisor config structure, and leave validation to virtcontainers. Without this change, we're doing duplicate validation. Signed-off-by: Eric Ernst <eric_ernst@apple.com>
This commit is contained in:
@@ -1017,7 +1017,7 @@ func TestHypervisorDefaultsKernel(t *testing.T) {
|
||||
assert.Equal(h.kernelParams(), kernelParams, "custom hypervisor kernel parameterms wrong")
|
||||
}
|
||||
|
||||
// The default initrd path is not returned by h.initrd()
|
||||
// The default initrd path is not returned by h.initrd(), it isn't an error if path isn't provided
|
||||
func TestHypervisorDefaultsInitrd(t *testing.T) {
|
||||
assert := assert.New(t)
|
||||
|
||||
@@ -1041,18 +1041,18 @@ func TestHypervisorDefaultsInitrd(t *testing.T) {
|
||||
defaultInitrdPath = testInitrdPath
|
||||
h := hypervisor{}
|
||||
p, err := h.initrd()
|
||||
assert.Error(err)
|
||||
assert.NoError(err)
|
||||
assert.Equal(p, "", "default Image path wrong")
|
||||
|
||||
// test path resolution
|
||||
defaultInitrdPath = testInitrdLinkPath
|
||||
h = hypervisor{}
|
||||
p, err = h.initrd()
|
||||
assert.Error(err)
|
||||
assert.NoError(err)
|
||||
assert.Equal(p, "")
|
||||
}
|
||||
|
||||
// The default image path is not returned by h.image()
|
||||
// The default image path is not returned by h.image(), it isn't an error if path isn't provided
|
||||
func TestHypervisorDefaultsImage(t *testing.T) {
|
||||
assert := assert.New(t)
|
||||
|
||||
@@ -1076,14 +1076,14 @@ func TestHypervisorDefaultsImage(t *testing.T) {
|
||||
defaultImagePath = testImagePath
|
||||
h := hypervisor{}
|
||||
p, err := h.image()
|
||||
assert.Error(err)
|
||||
assert.NoError(err)
|
||||
assert.Equal(p, "", "default Image path wrong")
|
||||
|
||||
// test path resolution
|
||||
defaultImagePath = testImageLinkPath
|
||||
h = hypervisor{}
|
||||
p, err = h.image()
|
||||
assert.Error(err)
|
||||
assert.NoError(err)
|
||||
assert.Equal(p, "")
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user