mirror of
https://github.com/kata-containers/kata-containers.git
synced 2025-07-06 12:06:49 +00:00
Merge pull request #1049 from sameo/topic/ctx-unset
virtcontainers: Add context when creating tests sandboxes
This commit is contained in:
commit
07a0b163f9
@ -1184,6 +1184,7 @@ func TestSandboxAttachDevicesVFIO(t *testing.T) {
|
|||||||
storage: &filesystem{},
|
storage: &filesystem{},
|
||||||
hypervisor: &mockHypervisor{},
|
hypervisor: &mockHypervisor{},
|
||||||
devManager: dm,
|
devManager: dm,
|
||||||
|
ctx: context.Background(),
|
||||||
}
|
}
|
||||||
|
|
||||||
containers[c.id].sandbox = &sandbox
|
containers[c.id].sandbox = &sandbox
|
||||||
@ -1565,6 +1566,7 @@ func TestAttachBlockDevice(t *testing.T) {
|
|||||||
storage: fs,
|
storage: fs,
|
||||||
hypervisor: hypervisor,
|
hypervisor: hypervisor,
|
||||||
config: sconfig,
|
config: sconfig,
|
||||||
|
ctx: context.Background(),
|
||||||
}
|
}
|
||||||
|
|
||||||
contID := "100"
|
contID := "100"
|
||||||
@ -1653,6 +1655,7 @@ func TestPreAddDevice(t *testing.T) {
|
|||||||
hypervisor: hypervisor,
|
hypervisor: hypervisor,
|
||||||
config: sconfig,
|
config: sconfig,
|
||||||
devManager: dm,
|
devManager: dm,
|
||||||
|
ctx: context.Background(),
|
||||||
}
|
}
|
||||||
|
|
||||||
contID := "100"
|
contID := "100"
|
||||||
@ -1743,6 +1746,7 @@ func TestStartNetworkMonitor(t *testing.T) {
|
|||||||
networkNS: NetworkNamespace{
|
networkNS: NetworkNamespace{
|
||||||
NetNsPath: fmt.Sprintf("/proc/%d/task/%d/ns/net", os.Getpid(), unix.Gettid()),
|
NetNsPath: fmt.Sprintf("/proc/%d/task/%d/ns/net", os.Getpid(), unix.Gettid()),
|
||||||
},
|
},
|
||||||
|
ctx: context.Background(),
|
||||||
}
|
}
|
||||||
|
|
||||||
err = s.startNetworkMonitor()
|
err = s.startNetworkMonitor()
|
||||||
|
Loading…
Reference in New Issue
Block a user