mirror of
https://github.com/aljazceru/kata-containers.git
synced 2025-12-19 07:14:22 +01:00
hypervisor: Minimal exports of generic hypervisor internal fields
Export commonly used hypervisor fields and utility functions. These need to be exposed to allow the hypervisor to be consumed externally. Note: This does not change the hypervisor interface definition. Those changes will be separate commits. Signed-off-by: Manohar Castelino <mcastelino@apple.com>
This commit is contained in:
committed by
Eric Ernst
parent
03877f3479
commit
6baf2586ee
@@ -88,7 +88,7 @@ func TestNewHypervisorFromUnknownHypervisorType(t *testing.T) {
|
||||
}
|
||||
|
||||
func testHypervisorConfigValid(t *testing.T, hypervisorConfig *HypervisorConfig, success bool) {
|
||||
err := hypervisorConfig.valid()
|
||||
err := hypervisorConfig.Valid()
|
||||
assert := assert.New(t)
|
||||
assert.False(success && err != nil)
|
||||
assert.False(!success && err == nil)
|
||||
@@ -385,7 +385,7 @@ func TestGetHostMemorySizeKb(t *testing.T) {
|
||||
defer os.RemoveAll(dir)
|
||||
|
||||
file := filepath.Join(dir, "meminfo")
|
||||
_, err = getHostMemorySizeKb(file)
|
||||
_, err = GetHostMemorySizeKb(file)
|
||||
assert.Error(err)
|
||||
|
||||
for _, d := range data {
|
||||
@@ -393,7 +393,7 @@ func TestGetHostMemorySizeKb(t *testing.T) {
|
||||
assert.NoError(err)
|
||||
defer os.Remove(file)
|
||||
|
||||
hostMemKb, err := getHostMemorySizeKb(file)
|
||||
hostMemKb, err := GetHostMemorySizeKb(file)
|
||||
|
||||
assert.False((d.expectError && err == nil))
|
||||
assert.False((!d.expectError && err != nil))
|
||||
|
||||
Reference in New Issue
Block a user