Skip to content

Commit

Permalink
lint: Update code to handle lint issues
Browse files Browse the repository at this point in the history
Update code to handle lint issues after golangci-lint update to v1.6.0.

Fixes: kata-containers#527

Signed-off-by: Hui Zhu <[email protected]>
  • Loading branch information
teawater committed Apr 9, 2019
1 parent 828b417 commit d815c97
Showing 1 changed file with 33 additions and 33 deletions.
66 changes: 33 additions & 33 deletions grpc_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -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)
Expand Down

0 comments on commit d815c97

Please sign in to comment.