mirror of
https://github.com/kata-containers/kata-containers.git
synced 2025-07-17 17:02:42 +00:00
cli: fix build
Sadly CI failed to catch the broken line due to the fact that it is introduced by a different PR that passed w/o the naming PR. ./config.go:604:27: config.DefaultMemSz undefined (type virtcontainers.HypervisorConfig has no field or method DefaultMemSz) Makefile:331: recipe for target '/golang/src/github.com/kata-containers/runtime/kata-runtime' failed make: *** [/golang/src/github.com/kata-containers/runtime/kata-runtime] Error 2 Fixes: #709 Signed-off-by: Peng Tao <bergwolf@gmail.com>
This commit is contained in:
parent
52394c3c18
commit
13254440c6
@ -601,7 +601,7 @@ func checkHypervisorConfig(config vc.HypervisorConfig) error {
|
|||||||
},
|
},
|
||||||
}
|
}
|
||||||
|
|
||||||
memSizeMB := int64(config.DefaultMemSz)
|
memSizeMB := int64(config.MemorySize)
|
||||||
|
|
||||||
if memSizeMB == 0 {
|
if memSizeMB == 0 {
|
||||||
return errors.New("VM memory cannot be zero")
|
return errors.New("VM memory cannot be zero")
|
||||||
|
@ -476,7 +476,7 @@ func TestMinimalRuntimeConfig(t *testing.T) {
|
|||||||
imagePath := path.Join(dir, "image.img")
|
imagePath := path.Join(dir, "image.img")
|
||||||
initrdPath := path.Join(dir, "initrd.img")
|
initrdPath := path.Join(dir, "initrd.img")
|
||||||
|
|
||||||
hypervisorPath := path.Join(dir, "hypervisor")
|
hypervisorPath = path.Join(dir, "hypervisor")
|
||||||
kernelPath := path.Join(dir, "kernel")
|
kernelPath := path.Join(dir, "kernel")
|
||||||
|
|
||||||
savedDefaultImagePath := defaultImagePath
|
savedDefaultImagePath := defaultImagePath
|
||||||
@ -1389,9 +1389,9 @@ func TestCheckHypervisorConfig(t *testing.T) {
|
|||||||
kataLog.Logger.Out = logBuf
|
kataLog.Logger.Out = logBuf
|
||||||
|
|
||||||
config := vc.HypervisorConfig{
|
config := vc.HypervisorConfig{
|
||||||
ImagePath: d.imagePath,
|
ImagePath: d.imagePath,
|
||||||
InitrdPath: d.initrdPath,
|
InitrdPath: d.initrdPath,
|
||||||
DefaultMemSz: d.memBytes,
|
MemorySize: d.memBytes,
|
||||||
}
|
}
|
||||||
|
|
||||||
err := checkHypervisorConfig(config)
|
err := checkHypervisorConfig(config)
|
||||||
|
Loading…
Reference in New Issue
Block a user