Skip to content

Commit 54cc348

Browse files
committed
pkg/cri/server: don't import libcontainer/configs
Looks like this import was not needed for the test; simplified the test by just using the device-path (a counter would work, but for debugging, having the list of paths can be useful). Signed-off-by: Sebastiaan van Stijn <[email protected]>
1 parent ccde82d commit 54cc348

1 file changed

Lines changed: 2 additions & 3 deletions

File tree

pkg/cri/server/container_create_linux_test.go

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -31,7 +31,6 @@ import (
3131
"github.com/containerd/containerd/mount"
3232
"github.com/containerd/containerd/oci"
3333
imagespec "github.com/opencontainers/image-spec/specs-go/v1"
34-
libcontainerconfigs "github.com/opencontainers/runc/libcontainer/configs"
3534
"github.com/opencontainers/runc/libcontainer/devices"
3635
runtimespec "github.com/opencontainers/runtime-spec/specs-go"
3736
"github.com/opencontainers/selinux/go-selinux"
@@ -1346,11 +1345,11 @@ func TestPrivilegedDevices(t *testing.T) {
13461345

13471346
hostDevicesRaw, err := devices.HostDevices()
13481347
assert.NoError(t, err)
1349-
var hostDevices []*libcontainerconfigs.Device
1348+
var hostDevices = make([]string, 0)
13501349
for _, dev := range hostDevicesRaw {
13511350
// https://github.com/containerd/cri/pull/1521#issuecomment-652807951
13521351
if dev.DeviceRule.Major != 0 {
1353-
hostDevices = append(hostDevices, dev)
1352+
hostDevices = append(hostDevices, dev.Path)
13541353
}
13551354
}
13561355

0 commit comments

Comments
 (0)