mirror of
https://github.com/kata-containers/kata-containers.git
synced 2025-08-17 15:38:00 +00:00
virtcontainers: Reduce qemu test noise
We only need to set the context before calling into qemu's API. Fixes: #1211 Signed-off-by: Samuel Ortiz <sameo@linux.intel.com>
This commit is contained in:
parent
560902c8f1
commit
799ac6edf6
@ -200,6 +200,7 @@ func TestQemuMemoryTopology(t *testing.T) {
|
|||||||
|
|
||||||
func testQemuAddDevice(t *testing.T, devInfo interface{}, devType deviceType, expected []govmmQemu.Device) {
|
func testQemuAddDevice(t *testing.T, devInfo interface{}, devType deviceType, expected []govmmQemu.Device) {
|
||||||
q := &qemu{
|
q := &qemu{
|
||||||
|
ctx: context.Background(),
|
||||||
arch: &qemuArchBase{},
|
arch: &qemuArchBase{},
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -286,7 +287,9 @@ func TestQemuAddDeviceKataVSOCK(t *testing.T) {
|
|||||||
}
|
}
|
||||||
|
|
||||||
func TestQemuGetSandboxConsole(t *testing.T) {
|
func TestQemuGetSandboxConsole(t *testing.T) {
|
||||||
q := &qemu{}
|
q := &qemu{
|
||||||
|
ctx: context.Background(),
|
||||||
|
}
|
||||||
sandboxID := "testSandboxID"
|
sandboxID := "testSandboxID"
|
||||||
expected := filepath.Join(RunVMStoragePath, sandboxID, consoleSocket)
|
expected := filepath.Join(RunVMStoragePath, sandboxID, consoleSocket)
|
||||||
|
|
||||||
@ -302,6 +305,7 @@ func TestQemuGetSandboxConsole(t *testing.T) {
|
|||||||
|
|
||||||
func TestQemuCapabilities(t *testing.T) {
|
func TestQemuCapabilities(t *testing.T) {
|
||||||
q := &qemu{
|
q := &qemu{
|
||||||
|
ctx: context.Background(),
|
||||||
arch: &qemuArchBase{},
|
arch: &qemuArchBase{},
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -365,6 +369,7 @@ func TestHotplugUnsupportedDeviceType(t *testing.T) {
|
|||||||
qemuConfig := newQemuConfig()
|
qemuConfig := newQemuConfig()
|
||||||
fs := &filesystem{}
|
fs := &filesystem{}
|
||||||
q := &qemu{
|
q := &qemu{
|
||||||
|
ctx: context.Background(),
|
||||||
config: qemuConfig,
|
config: qemuConfig,
|
||||||
storage: fs,
|
storage: fs,
|
||||||
}
|
}
|
||||||
@ -394,6 +399,7 @@ func TestQemuCleanup(t *testing.T) {
|
|||||||
assert := assert.New(t)
|
assert := assert.New(t)
|
||||||
|
|
||||||
q := &qemu{
|
q := &qemu{
|
||||||
|
ctx: context.Background(),
|
||||||
config: newQemuConfig(),
|
config: newQemuConfig(),
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user