-
k8s-merge-robot authored
Automatic merge from submit-queue Use slices of items to clean up after tests Fixes #27582. We used to maintain a pointer variable for each process to kill after the tests finish. @lavalamp suggested using a slice instead, which is a much cleaner solution. This implements @lavalamp's suggestion and also extends the idea to tracking directories that need to be removed after the tests finish. This also means that we should no longer check for nil `killCmd`s inside `func (k *killCmd) Kill() error {...}` (see #27582 and #27589). If a nil `killCmd` makes it in there, something is bad elsewhere and we want to see the nil pointer exception immediately. Mentioning @timstclair and @euank wrt the original issue/PR.480233c5