mirror of
https://github.com/aljazceru/kata-containers.git
synced 2026-01-23 08:14:35 +01:00
Even CCA, which is the confidential compute archtecture, has not been ready, add a empty implementation to avoid static check error. Fixes: #2789 Signed-off-by: Jianyong Wu <jianyong.wu@arm.com> Suggested-by: Fabiano Fidêncio <fidencio@redhat.com>
36 lines
636 B
Go
36 lines
636 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)
|
|
}
|
|
|
|
func TestAvailableGuestProtection(t *testing.T) {
|
|
assert := assert.New(t)
|
|
|
|
out, _ := availableGuestProtection()
|
|
assert.Equal(out, noneProtection)
|
|
}
|