mirror of
https://github.com/kata-containers/kata-containers.git
synced 2025-09-02 17:34:18 +00:00
runtime: Merge fixes
Update tests to fix merge errors Signed-off-by: stevenhorsman <steven@uk.ibm.com>
This commit is contained in:
@@ -14,6 +14,7 @@ import (
|
|||||||
"os"
|
"os"
|
||||||
"testing"
|
"testing"
|
||||||
|
|
||||||
|
"github.com/intel-go/cpuid"
|
||||||
govmmQemu "github.com/kata-containers/kata-containers/src/runtime/pkg/govmm/qemu"
|
govmmQemu "github.com/kata-containers/kata-containers/src/runtime/pkg/govmm/qemu"
|
||||||
"github.com/kata-containers/kata-containers/src/runtime/virtcontainers/types"
|
"github.com/kata-containers/kata-containers/src/runtime/virtcontainers/types"
|
||||||
"github.com/stretchr/testify/assert"
|
"github.com/stretchr/testify/assert"
|
||||||
@@ -279,7 +280,7 @@ func TestQemuAmd64AppendProtectionDevice(t *testing.T) {
|
|||||||
assert.NoError(err)
|
assert.NoError(err)
|
||||||
assert.Empty(bios)
|
assert.Empty(bios)
|
||||||
|
|
||||||
expectedOut = append(expectedOut,
|
expectedOut := []govmmQemu.Device{
|
||||||
govmmQemu.Object{
|
govmmQemu.Object{
|
||||||
Type: govmmQemu.SNPGuest,
|
Type: govmmQemu.SNPGuest,
|
||||||
ID: "snp",
|
ID: "snp",
|
||||||
@@ -288,7 +289,7 @@ func TestQemuAmd64AppendProtectionDevice(t *testing.T) {
|
|||||||
CBitPos: cpuid.AMDMemEncrypt.CBitPosition,
|
CBitPos: cpuid.AMDMemEncrypt.CBitPosition,
|
||||||
ReducedPhysBits: 1,
|
ReducedPhysBits: 1,
|
||||||
},
|
},
|
||||||
)
|
}
|
||||||
|
|
||||||
assert.Equal(expectedOut, devices)
|
assert.Equal(expectedOut, devices)
|
||||||
|
|
||||||
@@ -299,7 +300,7 @@ func TestQemuAmd64AppendProtectionDevice(t *testing.T) {
|
|||||||
assert.NoError(err)
|
assert.NoError(err)
|
||||||
assert.Empty(bios)
|
assert.Empty(bios)
|
||||||
|
|
||||||
expectedOut := []govmmQemu.Device{
|
expectedOut = append(expectedOut,
|
||||||
govmmQemu.Object{
|
govmmQemu.Object{
|
||||||
Driver: govmmQemu.Loader,
|
Driver: govmmQemu.Loader,
|
||||||
Type: govmmQemu.TDXGuest,
|
Type: govmmQemu.TDXGuest,
|
||||||
@@ -308,7 +309,7 @@ func TestQemuAmd64AppendProtectionDevice(t *testing.T) {
|
|||||||
Debug: false,
|
Debug: false,
|
||||||
File: firmware,
|
File: firmware,
|
||||||
},
|
},
|
||||||
}
|
)
|
||||||
|
|
||||||
assert.Equal(expectedOut, devices)
|
assert.Equal(expectedOut, devices)
|
||||||
}
|
}
|
||||||
|
Reference in New Issue
Block a user