fix: linter issue
megacheck, gosimple and unused has been deprecated and subsumed by staticcheck. And staticcheck also has been upgraded. we need to update code for the linter issue. close: #2945 Signed-off-by: Wei Fu <fuweid89@gmail.com>
This commit is contained in:
@@ -136,7 +136,7 @@ func TestContainerStart(t *testing.T) {
|
||||
t.Fatal(err)
|
||||
}
|
||||
|
||||
if pid := task.Pid(); pid <= 0 {
|
||||
if pid := task.Pid(); pid < 1 {
|
||||
t.Errorf("invalid task pid %d", pid)
|
||||
}
|
||||
if err := task.Start(ctx); err != nil {
|
||||
@@ -435,7 +435,7 @@ func TestContainerPids(t *testing.T) {
|
||||
}
|
||||
|
||||
pid := task.Pid()
|
||||
if pid <= 0 {
|
||||
if pid < 1 {
|
||||
t.Errorf("invalid task pid %d", pid)
|
||||
}
|
||||
processes, err := task.Pids(ctx)
|
||||
@@ -785,7 +785,7 @@ func TestWaitStoppedTask(t *testing.T) {
|
||||
t.Fatal(err)
|
||||
}
|
||||
|
||||
if pid := task.Pid(); pid <= 0 {
|
||||
if pid := task.Pid(); pid < 1 {
|
||||
t.Errorf("invalid task pid %d", pid)
|
||||
}
|
||||
if err := task.Start(ctx); err != nil {
|
||||
|
Reference in New Issue
Block a user