Files
kata-containers/src/runtime/virtcontainers/hypervisor_arm64_test.go
Peng Tao a02a8bda66 runtime: move all code to src/runtime
To prepare for merging into kata-containers repository.

Signed-off-by: Peng Tao <bergwolf@hyper.sh>
2020-04-27 19:39:25 -07:00

29 lines
484 B
Go

// Copyright (c) 2019 ARM Limited
//
// SPDX-License-Identifier: Apache-2.0
//
package virtcontainers
import (
"io/ioutil"
"os"
"testing"
"github.com/stretchr/testify/assert"
)
func TestRunningOnVMM(t *testing.T) {
assert := assert.New(t)
expectedOutput := false
f, err := ioutil.TempFile("", "cpuinfo")
assert.NoError(err)
defer os.Remove(f.Name())
defer f.Close()
running, err := RunningOnVMM(f.Name())
assert.NoError(err)
assert.Equal(expectedOutput, running)
}