Skip to content

Commit

Permalink
Fix error in unittest, as pointed out by warning
Browse files Browse the repository at this point in the history
"conversion from int to string yields a string of one rune,
not a string of digits (did you mean fmt.Sprint(x)?)"
  • Loading branch information
afbjorklund committed Sep 28, 2020
1 parent d6d1079 commit 647c857
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion pkg/drivers/kic/kic.go
Original file line number Diff line number Diff line change
Expand Up @@ -403,7 +403,7 @@ func killAPIServerProc(runner command.Runner) error {
pid, err := strconv.Atoi(rr.Stdout.String())
if err == nil { // this means we have a valid pid
glog.Warningf("Found a kube-apiserver running with pid %d, will try to kill the proc", pid)
if _, err = runner.RunCmd(exec.Command("pkill", "-9", string(pid))); err != nil {
if _, err = runner.RunCmd(exec.Command("pkill", "-9", fmt.Sprint(pid))); err != nil {
return errors.Wrap(err, "kill")
}
}
Expand Down

0 comments on commit 647c857

Please sign in to comment.