diff --git a/grpc_test.go b/grpc_test.go index b660d85eec..57eb4e1401 100644 --- a/grpc_test.go +++ b/grpc_test.go @@ -869,42 +869,42 @@ func TestPosixRlimitsToRlimits(t *testing.T) { assert := assert.New(t) expectedRlimits := []configs.Rlimit{ - {unix.RLIMIT_CPU, 100, 120}, - {unix.RLIMIT_FSIZE, 100, 120}, - {unix.RLIMIT_DATA, 100, 120}, - {unix.RLIMIT_STACK, 100, 120}, - {unix.RLIMIT_CORE, 100, 120}, - {unix.RLIMIT_RSS, 100, 120}, - {unix.RLIMIT_NPROC, 100, 120}, - {unix.RLIMIT_NOFILE, 100, 120}, - {unix.RLIMIT_MEMLOCK, 100, 120}, - {unix.RLIMIT_AS, 100, 120}, - {unix.RLIMIT_LOCKS, 100, 120}, - {unix.RLIMIT_SIGPENDING, 100, 120}, - {unix.RLIMIT_MSGQUEUE, 100, 120}, - {unix.RLIMIT_NICE, 100, 120}, - {unix.RLIMIT_RTPRIO, 100, 120}, - {unix.RLIMIT_RTTIME, 100, 120}, + {Type: unix.RLIMIT_CPU, Hard: 100, Soft: 120}, + {Type: unix.RLIMIT_FSIZE, Hard: 100, Soft: 120}, + {Type: unix.RLIMIT_DATA, Hard: 100, Soft: 120}, + {Type: unix.RLIMIT_STACK, Hard: 100, Soft: 120}, + {Type: unix.RLIMIT_CORE, Hard: 100, Soft: 120}, + {Type: unix.RLIMIT_RSS, Hard: 100, Soft: 120}, + {Type: unix.RLIMIT_NPROC, Hard: 100, Soft: 120}, + {Type: unix.RLIMIT_NOFILE, Hard: 100, Soft: 120}, + {Type: unix.RLIMIT_MEMLOCK, Hard: 100, Soft: 120}, + {Type: unix.RLIMIT_AS, Hard: 100, Soft: 120}, + {Type: unix.RLIMIT_LOCKS, Hard: 100, Soft: 120}, + {Type: unix.RLIMIT_SIGPENDING, Hard: 100, Soft: 120}, + {Type: unix.RLIMIT_MSGQUEUE, Hard: 100, Soft: 120}, + {Type: unix.RLIMIT_NICE, Hard: 100, Soft: 120}, + {Type: unix.RLIMIT_RTPRIO, Hard: 100, Soft: 120}, + {Type: unix.RLIMIT_RTTIME, Hard: 100, Soft: 120}, } posixRlimits := []specs.POSIXRlimit{ - {"RLIMIT_CPU", 100, 120}, - {"RLIMIT_FSIZE", 100, 120}, - {"RLIMIT_DATA", 100, 120}, - {"RLIMIT_STACK", 100, 120}, - {"RLIMIT_CORE", 100, 120}, - {"RLIMIT_RSS", 100, 120}, - {"RLIMIT_NPROC", 100, 120}, - {"RLIMIT_NOFILE", 100, 120}, - {"RLIMIT_MEMLOCK", 100, 120}, - {"RLIMIT_AS", 100, 120}, - {"RLIMIT_LOCKS", 100, 120}, - {"RLIMIT_SIGPENDING", 100, 120}, - {"RLIMIT_MSGQUEUE", 100, 120}, - {"RLIMIT_NICE", 100, 120}, - {"RLIMIT_RTPRIO", 100, 120}, - {"RLIMIT_RTTIME", 100, 120}, - {"RLIMIT_UNSUPPORTED", 0, 0}, + {Type: "RLIMIT_CPU", Hard: 100, Soft: 120}, + {Type: "RLIMIT_FSIZE", Hard: 100, Soft: 120}, + {Type: "RLIMIT_DATA", Hard: 100, Soft: 120}, + {Type: "RLIMIT_STACK", Hard: 100, Soft: 120}, + {Type: "RLIMIT_CORE", Hard: 100, Soft: 120}, + {Type: "RLIMIT_RSS", Hard: 100, Soft: 120}, + {Type: "RLIMIT_NPROC", Hard: 100, Soft: 120}, + {Type: "RLIMIT_NOFILE", Hard: 100, Soft: 120}, + {Type: "RLIMIT_MEMLOCK", Hard: 100, Soft: 120}, + {Type: "RLIMIT_AS", Hard: 100, Soft: 120}, + {Type: "RLIMIT_LOCKS", Hard: 100, Soft: 120}, + {Type: "RLIMIT_SIGPENDING", Hard: 100, Soft: 120}, + {Type: "RLIMIT_MSGQUEUE", Hard: 100, Soft: 120}, + {Type: "RLIMIT_NICE", Hard: 100, Soft: 120}, + {Type: "RLIMIT_RTPRIO", Hard: 100, Soft: 120}, + {Type: "RLIMIT_RTTIME", Hard: 100, Soft: 120}, + {Type: "RLIMIT_UNSUPPORTED", Hard: 0, Soft: 0}, } rlimits := posixRlimitsToRlimits(posixRlimits)