mirror of
https://github.com/opencontainers/runc.git
synced 2026-04-22 23:17:17 +08:00
libcontainer: isolate libcontainer/devices
Move the Device-related types to libcontainer/devices, so that the package can be used in isolation. Aliases have been created in libcontainer/configs for backward compatibility. Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
This commit is contained in:
@@ -7,12 +7,12 @@ import (
|
||||
"strings"
|
||||
"testing"
|
||||
|
||||
"golang.org/x/sys/unix"
|
||||
|
||||
dbus "github.com/godbus/dbus/v5"
|
||||
"github.com/opencontainers/runc/libcontainer/configs"
|
||||
"github.com/opencontainers/runc/libcontainer/configs/validate"
|
||||
"github.com/opencontainers/runc/libcontainer/devices"
|
||||
"github.com/opencontainers/runtime-spec/specs-go"
|
||||
"golang.org/x/sys/unix"
|
||||
)
|
||||
|
||||
func TestCreateCommandHookTimeout(t *testing.T) {
|
||||
@@ -722,13 +722,13 @@ func TestCreateDevices(t *testing.T) {
|
||||
// Verify that createDevices() deduplicated the /dev/tty entry in the config
|
||||
for _, configDev := range conf.Devices {
|
||||
if configDev.Path == "/dev/tty" {
|
||||
wantDev := &configs.Device{
|
||||
wantDev := &devices.Device{
|
||||
Path: "/dev/tty",
|
||||
FileMode: 0666,
|
||||
Uid: 1000,
|
||||
Gid: 1000,
|
||||
DeviceRule: configs.DeviceRule{
|
||||
Type: configs.CharDevice,
|
||||
DeviceRule: devices.DeviceRule{
|
||||
Type: devices.CharDevice,
|
||||
Major: 5,
|
||||
Minor: 0,
|
||||
},
|
||||
|
||||
Reference in New Issue
Block a user