CRI integration test for Windows Device mounts
This test takes advantage of the fact that when you tell Windows to mount the GUID_DEVINTERFACE_DISPLAY_ADAPTER class, it will also mount the host's device store into the container, even if there is no real GPU on the host. Signed-off-by: Paul "TBBle" Hampson <Paul.Hampson@Pobox.com>
This commit is contained in:
@@ -297,6 +297,15 @@ func WithSupplementalGroups(gids []int64) ContainerOpts { //nolint:unused
|
||||
}
|
||||
}
|
||||
|
||||
// WithDevice adds a device mount.
|
||||
func WithDevice(containerPath, hostPath, permissions string) ContainerOpts { //nolint:unused
|
||||
return func(c *runtime.ContainerConfig) {
|
||||
c.Devices = append(c.Devices, &runtime.Device{
|
||||
ContainerPath: containerPath, HostPath: hostPath, Permissions: permissions,
|
||||
})
|
||||
}
|
||||
}
|
||||
|
||||
// ContainerConfig creates a container config given a name and image name
|
||||
// and additional container config options
|
||||
func ContainerConfig(name, image string, opts ...ContainerOpts) *runtime.ContainerConfig {
|
||||
|
||||
Reference in New Issue
Block a user