Fix error in unittest, as pointed out by warning

"conversion from int to string yields a string of one rune,
not a string of digits (did you mean fmt.Sprint(x)?)"
pull/9345/head
Anders F Björklund 2020-09-28 21:40:14 +02:00
parent d6d10797f8
commit 647c857fe1
1 changed files with 1 additions and 1 deletions

View File

@ -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")
}
}