mirror of
https://github.com/kata-containers/kata-containers.git
synced 2025-08-15 06:34:03 +00:00
virtcontainers: Fix TestQemuAmd64AppendProtectionDevice()
Since SEV support has been added, an implementation mistake was also added to TestQemuAmd64AppendProtectionDevice. appendProtectionDevice() will, as it name says, append the protection device to whatever was there previously. So, when SEV was added, we broke the comparison done for TDX as we didn't append the expected output for TDX with what we already had for SEV. This should be enough to get the tests passing. Signed-off-by: Fabiano Fidêncio <fidencio@redhat.com>
This commit is contained in:
parent
b26d5b1d08
commit
be31694554
@ -327,7 +327,7 @@ func TestQemuAmd64AppendProtectionDevice(t *testing.T) {
|
||||
assert.NoError(err)
|
||||
assert.Empty(bios)
|
||||
|
||||
expectedOut = []govmmQemu.Device{
|
||||
expectedOut = append(expectedOut,
|
||||
govmmQemu.Object{
|
||||
Driver: govmmQemu.Loader,
|
||||
Type: govmmQemu.TDXGuest,
|
||||
@ -336,7 +336,7 @@ func TestQemuAmd64AppendProtectionDevice(t *testing.T) {
|
||||
Debug: false,
|
||||
File: firmware,
|
||||
},
|
||||
}
|
||||
)
|
||||
|
||||
assert.Equal(expectedOut, devices)
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user